diff options
Diffstat (limited to 'tests')
46 files changed, 317 insertions, 368 deletions
diff --git a/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.2-1.js b/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.2-1.js index a4bf1c7de6..87cba8cd2f 100644 --- a/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.2-1.js +++ b/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.2-1.js @@ -252,44 +252,6 @@ for ( HEX_STRING = "-0x0", HEX_VALUE = 0, POWER = 0; POWER < 15; POWER++, HEX_ST HEX_VALUE -= Math.pow(16,POWER)*15; } -// let us do some octal tests. numbers that start with 0 and do not provid a radix should -// default to using "0" as a radix. - -var OCT_STRING = "0"; -var OCT_VALUE = 0; - -for ( OCT_STRING = "0", OCT_VALUE = 0, POWER = 0; POWER < 15; POWER++, OCT_STRING = OCT_STRING +"7" ) { - new TestCase( SECTION, "parseInt("+OCT_STRING+")", OCT_VALUE, parseInt(OCT_STRING) ); - OCT_VALUE += Math.pow(8,POWER)*7; -} - -for ( OCT_STRING = "-0", OCT_VALUE = 0, POWER = 0; POWER < 15; POWER++, OCT_STRING = OCT_STRING +"7" ) { - new TestCase( SECTION, "parseInt("+OCT_STRING+")", OCT_VALUE, parseInt(OCT_STRING) ); - OCT_VALUE -= Math.pow(8,POWER)*7; -} - -// should get the same results as above if we provid the radix of 8 (or 010) - -for ( OCT_STRING = "0", OCT_VALUE = 0, POWER = 0; POWER < 15; POWER++, OCT_STRING = OCT_STRING +"7" ) { - new TestCase( SECTION, "parseInt("+OCT_STRING+",8)", OCT_VALUE, parseInt(OCT_STRING,8) ); - OCT_VALUE += Math.pow(8,POWER)*7; -} -for ( OCT_STRING = "-0", OCT_VALUE = 0, POWER = 0; POWER < 15; POWER++, OCT_STRING = OCT_STRING +"7" ) { - new TestCase( SECTION, "parseInt("+OCT_STRING+",010)", OCT_VALUE, parseInt(OCT_STRING,010) ); - OCT_VALUE -= Math.pow(8,POWER)*7; -} - -// we shall stop parsing digits when we get one that isn't a numeric literal of the type we think -// it should be. -for ( OCT_STRING = "0", OCT_VALUE = 0, POWER = 0; POWER < 15; POWER++, OCT_STRING = OCT_STRING +"7" ) { - new TestCase( SECTION, "parseInt("+OCT_STRING+"8,8)", OCT_VALUE, parseInt(OCT_STRING+"8",8) ); - OCT_VALUE += Math.pow(8,POWER)*7; -} -for ( OCT_STRING = "-0", OCT_VALUE = 0, POWER = 0; POWER < 15; POWER++, OCT_STRING = OCT_STRING +"7" ) { - new TestCase( SECTION, "parseInt("+OCT_STRING+"8,010)", OCT_VALUE, parseInt(OCT_STRING+"8",010) ); - OCT_VALUE -= Math.pow(8,POWER)*7; -} - new TestCase( SECTION, "parseInt( '0x' )", NaN, diff --git a/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.3-1.js b/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.3-1.js index 56bf83adcc..a89154e597 100644 --- a/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.3-1.js +++ b/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.3-1.js @@ -384,43 +384,12 @@ new TestCase( SECTION, "parseFloat(0XE)", 14, parseFloat(0XE)); new TestCase( SECTION, "parseFloat(0XF)", 15, parseFloat(0XF)); -// A StringNumericLiteral may not use octal notation - -new TestCase( SECTION, "parseFloat('00')", 0, parseFloat("00")); -new TestCase( SECTION, "parseFloat('01')", 1, parseFloat("01")); -new TestCase( SECTION, "parseFloat('02')", 2, parseFloat("02")); -new TestCase( SECTION, "parseFloat('03')", 3, parseFloat("03")); -new TestCase( SECTION, "parseFloat('04')", 4, parseFloat("04")); -new TestCase( SECTION, "parseFloat('05')", 5, parseFloat("05")); -new TestCase( SECTION, "parseFloat('06')", 6, parseFloat("06")); -new TestCase( SECTION, "parseFloat('07')", 7, parseFloat("07")); -new TestCase( SECTION, "parseFloat('010')", 10, parseFloat("010")); -new TestCase( SECTION, "parseFloat('011')", 11, parseFloat("011")); - // A StringNumericLIteral may have any number of leading 0 digits new TestCase( SECTION, "parseFloat('001')", 1, parseFloat("001")); new TestCase( SECTION, "parseFloat('0001')", 1, parseFloat("0001")); new TestCase( SECTION, "parseFloat(' 0001 ')", 1, parseFloat(" 0001 ")); -// an octal numeric literal should be treated as an octal - -new TestCase( SECTION, "parseFloat(00)", 0, parseFloat(00)); -new TestCase( SECTION, "parseFloat(01)", 1, parseFloat(01)); -new TestCase( SECTION, "parseFloat(02)", 2, parseFloat(02)); -new TestCase( SECTION, "parseFloat(03)", 3, parseFloat(03)); -new TestCase( SECTION, "parseFloat(04)", 4, parseFloat(04)); -new TestCase( SECTION, "parseFloat(05)", 5, parseFloat(05)); -new TestCase( SECTION, "parseFloat(06)", 6, parseFloat(06)); -new TestCase( SECTION, "parseFloat(07)", 7, parseFloat(07)); -new TestCase( SECTION, "parseFloat(010)", 8, parseFloat(010)); -new TestCase( SECTION, "parseFloat(011)", 9, parseFloat(011)); - -// A StringNumericLIteral may have any number of leading 0 digits - -new TestCase( SECTION, "parseFloat(001)", 1, parseFloat(001)); -new TestCase( SECTION, "parseFloat(0001)", 1, parseFloat(0001)); - // make sure it's reflexive new TestCase( SECTION, "parseFloat(Math.PI)", Math.PI, parseFloat(Math.PI)); new TestCase( SECTION, "parseFloat(Math.LN2)", Math.LN2, parseFloat(Math.LN2)); diff --git a/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.3-2.js b/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.3-2.js index 557b93f637..1167b73ee1 100644 --- a/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.3-2.js +++ b/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.3-2.js @@ -256,28 +256,6 @@ new TestCase( SECTION, "parseFloat(' 0XD')", 0, parseFl new TestCase( SECTION, "parseFloat(' 0XE')", 0, parseFloat(" 0XE")); new TestCase( SECTION, "parseFloat(' 0XF')", 0, parseFloat(" 0XF")); -// A StringNumericLiteral may not use octal notation - -new TestCase( SECTION, "parseFloat(' 00')", 0, parseFloat(" 00")); -new TestCase( SECTION, "parseFloat(' 01')", 1, parseFloat(" 01")); -new TestCase( SECTION, "parseFloat(' 02')", 2, parseFloat(" 02")); -new TestCase( SECTION, "parseFloat(' 03')", 3, parseFloat(" 03")); -new TestCase( SECTION, "parseFloat(' 04')", 4, parseFloat(" 04")); -new TestCase( SECTION, "parseFloat(' 05')", 5, parseFloat(" 05")); -new TestCase( SECTION, "parseFloat(' 06')", 6, parseFloat(" 06")); -new TestCase( SECTION, "parseFloat(' 07')", 7, parseFloat(" 07")); -new TestCase( SECTION, "parseFloat(' 010')", 10, parseFloat(" 010")); -new TestCase( SECTION, "parseFloat(' 011')", 11, parseFloat(" 011")); - -// A StringNumericLIteral may have any number of leading 0 digits - -new TestCase( SECTION, "parseFloat(' 001')", 1, parseFloat(" 001")); -new TestCase( SECTION, "parseFloat(' 0001')", 1, parseFloat(" 0001")); - -// A StringNumericLIteral may have any number of leading 0 digits - -new TestCase( SECTION, "parseFloat(001)", 1, parseFloat(001)); -new TestCase( SECTION, "parseFloat(0001)", 1, parseFloat(0001)); // make sure it' s reflexive new TestCase( SECTION, "parseFloat( ' ' +Math.PI+' ')", Math.PI, parseFloat( ' ' +Math.PI+' ')); diff --git a/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.6.js b/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.6.js index faeeb9e0b0..18f1986d7e 100644 --- a/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.6.js +++ b/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.6.js @@ -106,9 +106,6 @@ new TestCase( SECTION, "isNaN( '0xaa' )", false, isNaN( "0xaa" ) new TestCase( SECTION, "isNaN( '0x0A' )", false, isNaN( "0x0A" ) ); new TestCase( SECTION, "isNaN( '0xAA' )", false, isNaN( "0xAA" ) ); -new TestCase( SECTION, "isNaN( 077 )", false, isNaN( 077 ) ); -new TestCase( SECTION, "isNaN( '077' )", false, isNaN( "077" ) ); - new TestCase( SECTION, "isNaN( Number.NaN )", true, isNaN(Number.NaN) ); new TestCase( SECTION, "isNaN( Number.POSITIVE_INFINITY )", false, isNaN(Number.POSITIVE_INFINITY) ); diff --git a/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.7.js b/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.7.js index e3db5e7931..9eb52a8ff1 100644 --- a/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.7.js +++ b/tests/auto/qml/parserstress/tests/ecma/GlobalObject/15.1.2.7.js @@ -107,9 +107,6 @@ new TestCase( SECTION, "isFinite( '0xaa' )", true, isFinite( "0 new TestCase( SECTION, "isFinite( '0x0A' )", true, isFinite( "0x0A" ) ); new TestCase( SECTION, "isFinite( '0xAA' )", true, isFinite( "0xAA" ) ); -new TestCase( SECTION, "isFinite( 077 )", true, isFinite( 077 ) ); -new TestCase( SECTION, "isFinite( '077' )", true, isFinite( "077" ) ); - new TestCase( SECTION, "isFinite( new String('Infinity') )", false, isFinite(new String("Infinity")) ); new TestCase( SECTION, "isFinite( new String('-Infinity') )", false, isFinite(new String("-Infinity")) ); diff --git a/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.7.3-1.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.7.3-1.js index fb13b24e07..3eacb2990f 100644 --- a/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.7.3-1.js +++ b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.7.3-1.js @@ -85,16 +85,6 @@ new TestCase( SECTION, 0x100000000 ); new TestCase( SECTION, - "077777777777777777", - 2251799813685247, - 077777777777777777 ); - -new TestCase( SECTION, - "077777777777777776", - 2251799813685246, - 077777777777777776 ); - -new TestCase( SECTION, "0x1fffffffffffff", 9007199254740991, 0x1fffffffffffff ); diff --git a/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.7.3-2.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.7.3-2.js index 8fbe16cb8f..6121cd54fd 100644 --- a/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.7.3-2.js +++ b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.7.3-2.js @@ -74,20 +74,4 @@ new TestCase( SECTION, 9, 9 ); -new TestCase( SECTION, - "09", - 9, - 09 ); - -new TestCase( SECTION, - "099", - 99, - 099 ); - - -new TestCase( SECTION, - "077", - 63, - 077 ); - test(); diff --git a/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.7.3.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.7.3.js index 9ccb912752..29635596e1 100644 --- a/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.7.3.js +++ b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.7.3.js @@ -215,24 +215,6 @@ new TestCase( SECTION, "0XE", 14, 0XE ); new TestCase( SECTION, "0XF", 15, 0XF ); -new TestCase( SECTION, "00", 0, 00 ); -new TestCase( SECTION, "01", 1, 01 ); -new TestCase( SECTION, "02", 2, 02 ); -new TestCase( SECTION, "03", 3, 03 ); -new TestCase( SECTION, "04", 4, 04 ); -new TestCase( SECTION, "05", 5, 05 ); -new TestCase( SECTION, "06", 6, 06 ); -new TestCase( SECTION, "07", 7, 07 ); - -new TestCase( SECTION, "000", 0, 000 ); -new TestCase( SECTION, "011", 9, 011 ); -new TestCase( SECTION, "022", 18, 022 ); -new TestCase( SECTION, "033", 27, 033 ); -new TestCase( SECTION, "044", 36, 044 ); -new TestCase( SECTION, "055", 45, 055 ); -new TestCase( SECTION, "066", 54, 066 ); -new TestCase( SECTION, "077", 63, 077 ); - new TestCase( SECTION, "0.00000000001", 0.00000000001, 0.00000000001 ); new TestCase( SECTION, "0.00000000001e-2", 0.0000000000001, 0.00000000001e-2 ); diff --git a/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.7.4.js b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.7.4.js index 015a385220..4a3173db6c 100644 --- a/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.7.4.js +++ b/tests/auto/qml/parserstress/tests/ecma/LexicalConventions/7.7.4.js @@ -76,53 +76,6 @@ new TestCase( SECTION, "\\v", String.fromCharCode(0x000B), "\v" ); // DoubleStringCharacters:DoubleStringCharacter::EscapeSequence::OctalEscapeSequence -new TestCase( SECTION, "\\00", String.fromCharCode(0x0000), "\00" ); -new TestCase( SECTION, "\\01", String.fromCharCode(0x0001), "\01" ); -new TestCase( SECTION, "\\02", String.fromCharCode(0x0002), "\02" ); -new TestCase( SECTION, "\\03", String.fromCharCode(0x0003), "\03" ); -new TestCase( SECTION, "\\04", String.fromCharCode(0x0004), "\04" ); -new TestCase( SECTION, "\\05", String.fromCharCode(0x0005), "\05" ); -new TestCase( SECTION, "\\06", String.fromCharCode(0x0006), "\06" ); -new TestCase( SECTION, "\\07", String.fromCharCode(0x0007), "\07" ); - -new TestCase( SECTION, "\\010", String.fromCharCode(0x0008), "\010" ); -new TestCase( SECTION, "\\011", String.fromCharCode(0x0009), "\011" ); -new TestCase( SECTION, "\\012", String.fromCharCode(0x000A), "\012" ); -new TestCase( SECTION, "\\013", String.fromCharCode(0x000B), "\013" ); -new TestCase( SECTION, "\\014", String.fromCharCode(0x000C), "\014" ); -new TestCase( SECTION, "\\015", String.fromCharCode(0x000D), "\015" ); -new TestCase( SECTION, "\\016", String.fromCharCode(0x000E), "\016" ); -new TestCase( SECTION, "\\017", String.fromCharCode(0x000F), "\017" ); -new TestCase( SECTION, "\\020", String.fromCharCode(0x0010), "\020" ); -new TestCase( SECTION, "\\042", String.fromCharCode(0x0022), "\042" ); - -new TestCase( SECTION, "\\0", String.fromCharCode(0x0000), "\0" ); -new TestCase( SECTION, "\\1", String.fromCharCode(0x0001), "\1" ); -new TestCase( SECTION, "\\2", String.fromCharCode(0x0002), "\2" ); -new TestCase( SECTION, "\\3", String.fromCharCode(0x0003), "\3" ); -new TestCase( SECTION, "\\4", String.fromCharCode(0x0004), "\4" ); -new TestCase( SECTION, "\\5", String.fromCharCode(0x0005), "\5" ); -new TestCase( SECTION, "\\6", String.fromCharCode(0x0006), "\6" ); -new TestCase( SECTION, "\\7", String.fromCharCode(0x0007), "\7" ); - -new TestCase( SECTION, "\\10", String.fromCharCode(0x0008), "\10" ); -new TestCase( SECTION, "\\11", String.fromCharCode(0x0009), "\11" ); -new TestCase( SECTION, "\\12", String.fromCharCode(0x000A), "\12" ); -new TestCase( SECTION, "\\13", String.fromCharCode(0x000B), "\13" ); -new TestCase( SECTION, "\\14", String.fromCharCode(0x000C), "\14" ); -new TestCase( SECTION, "\\15", String.fromCharCode(0x000D), "\15" ); -new TestCase( SECTION, "\\16", String.fromCharCode(0x000E), "\16" ); -new TestCase( SECTION, "\\17", String.fromCharCode(0x000F), "\17" ); -new TestCase( SECTION, "\\20", String.fromCharCode(0x0010), "\20" ); -new TestCase( SECTION, "\\42", String.fromCharCode(0x0022), "\42" ); - -new TestCase( SECTION, "\\000", String.fromCharCode(0), "\000" ); -new TestCase( SECTION, "\\111", String.fromCharCode(73), "\111" ); -new TestCase( SECTION, "\\222", String.fromCharCode(146), "\222" ); -new TestCase( SECTION, "\\333", String.fromCharCode(219), "\333" ); - -// following line commented out as it causes a compile time error -// new TestCase( SECTION, "\\444", "444", "\444" ); // DoubleStringCharacters:DoubleStringCharacter::EscapeSequence::HexEscapeSequence /* @@ -202,13 +155,10 @@ new TestCase( SECTION, "\\o", "o", "\o" ); new TestCase( SECTION, "\\p", "p", "\p" ); new TestCase( SECTION, "\\q", "q", "\q" ); new TestCase( SECTION, "\\s", "s", "\s" ); -new TestCase( SECTION, "\\u", "u", "\u" ); new TestCase( SECTION, "\\w", "w", "\w" ); -new TestCase( SECTION, "\\x", "x", "\x" ); new TestCase( SECTION, "\\y", "y", "\y" ); new TestCase( SECTION, "\\z", "z", "\z" ); -new TestCase( SECTION, "\\9", "9", "\9" ); new TestCase( SECTION, "\\A", "A", "\A" ); new TestCase( SECTION, "\\B", "B", "\B" ); diff --git a/tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.1.js b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.1.js index 0412742767..abe1095d40 100644 --- a/tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.1.js +++ b/tests/auto/qml/parserstress/tests/ecma/Math/15.8.2.1.js @@ -194,11 +194,6 @@ new TestCase( SECTION, Math.abs( -0xfff ) ); new TestCase( SECTION, - "Math.abs( -0777 )", - 511, - Math.abs(-0777 ) ); - -new TestCase( SECTION, "Math.abs('-1e-1')", 0.1, Math.abs('-1e-1') ); diff --git a/tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.3.1-3.js b/tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.3.1-3.js index dc56427395..3141906d5d 100644 --- a/tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.3.1-3.js +++ b/tests/auto/qml/parserstress/tests/ecma/TypeConversion/9.3.1-3.js @@ -296,16 +296,6 @@ new TestCase( SECTION, 0x100000000 ); new TestCase( SECTION, - "077777777777777777", - 2251799813685247, - 077777777777777777 ); - -new TestCase( SECTION, - "077777777777777776", - 2251799813685246, - 077777777777777776 ); - -new TestCase( SECTION, "0x1fffffffffffff", 9007199254740991, 0x1fffffffffffff ); diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/octal-002.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/octal-002.js index 401ad43c11..053720d7e9 100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/octal-002.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/octal-002.js @@ -125,70 +125,6 @@ expectedmatch = Array(string); addThis(); -/* - * This one should produce a match. The two-character string - * 'a' + '\011' is duplicated in the pattern and test string: - */ -status = inSection(4); -pattern = /.\011/; -string = 'a\011'; -actualmatch = string.match(pattern); -expectedmatch = Array(string); -addThis(); - - -/* - * Same as above, only now, for the second character of the string, - * use the Unicode escape '\u0009' instead of the octal escape '\011' - */ -status = inSection(5); -pattern = /.\011/; -string = 'a\u0009'; -actualmatch = string.match(pattern); -expectedmatch = Array(string); -addThis(); - - -/* - * Same as above, only now for the second character of the string, - * use the hex escape '\x09' instead of the octal escape '\011' - */ -status = inSection(6); -pattern = /.\011/; -string = 'a\x09'; -actualmatch = string.match(pattern); -expectedmatch = Array(string); -addThis(); - - -/* - * Same as above, only now for the second character of the string, - * use the escape '\t' instead of the octal escape '\011' - */ -status = inSection(7); -pattern = /.\011/; -string = 'a\t'; -actualmatch = string.match(pattern); -expectedmatch = Array(string); -addThis(); - - -/* - * Return to the string from Section 1. - * - * Unlike Section 1, use the RegExp() function to create the - * regexp pattern: null character followed by the string '11'. - * - * Since this is exactly what the string is, we should get a match - - */ -status = inSection(8); -string = 'a' + String.fromCharCode(0) + '11'; -pattern = RegExp(string); -actualmatch = string.match(pattern); -expectedmatch = Array(string); -addThis(); - - //------------------------------------------------------------------------------------------------- diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-85721.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-85721.js index bca1a15e19..7b811abc31 100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-85721.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-85721.js @@ -111,11 +111,11 @@ testRegExp([status], [re], [str], [result], [expect]); //# Some things for avoiding backslashitis later on. $esc = '\\\\'; $Period = '\.'; -$space = '\040'; $tab = '\t'; +$space = '\x20'; $tab = '\t'; $OpenBR = '\\['; $CloseBR = '\\]'; $OpenParen = '\\('; $CloseParen = '\\)'; -$NonASCII = '\x80-\xff'; $ctrl = '\000-\037'; -$CRlist = '\n\015'; //# note: this should really be only \015. +$NonASCII = '\x80-\xff'; $ctrl = '\0-\x1f'; +$CRlist = '\n\x0d'; //# note: this should really be only \015. // Items 19, 20, 21 $qtext = '[^' + $esc + $NonASCII + $CRlist + '\"]'; // # for within "..." $dtext = '[^' + $esc + $NonASCII + $CRlist + $OpenBR + $CloseBR + ']'; // # for within [...] @@ -226,7 +226,7 @@ $route_addr = '>'; // # > //# Item 3: phrase........ -$phrase_ctrl = '\000-\010\012-\037'; // # like ctrl, but without tab +$phrase_ctrl = '\0-\x08\x0a-\x1f'; // # like ctrl, but without tab //# Like atom-char, but without listing space, and uses phrase_ctrl. //# Since the class is negated, this matches the same as atom-char plus space and tab diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-441477-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-441477-01.js index 1be199743d..27ddfab51d 100755 --- a/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-441477-01.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-441477-01.js @@ -37,7 +37,7 @@ var gTestfile = 'regress-441477-01.js'; //----------------------------------------------------------------------------- -var BUGNUMBER = 441477-01; +var BUGNUMBER = 441477.01; var summary = ''; var actual = 'No Exception'; var expect = 'No Exception'; diff --git a/tests/auto/qml/parserstress/tests/ecma_3/String/regress-392378.js b/tests/auto/qml/parserstress/tests/ecma_3/String/regress-392378.js index 368fde1278..59564b272e 100755 --- a/tests/auto/qml/parserstress/tests/ecma_3/String/regress-392378.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/String/regress-392378.js @@ -55,7 +55,7 @@ function test() expect = ["", undefined, ""] + ''; actual = "y".split(/(x)?\1y/) + ''; - reportCompare(expect, actual, summary + ': "y".split(/(x)?\1y/)'); + reportCompare(expect, actual, summary + ': "y".split(/(x)?\\1y/)'); expect = ["", undefined, ""] + ''; actual = "y".split(/(x)?y/) + ''; diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Unicode/regress-352044-02-n.js b/tests/auto/qml/parserstress/tests/ecma_3/Unicode/regress-352044-02-n.js deleted file mode 100755 index 0e3c4b0189..0000000000 --- a/tests/auto/qml/parserstress/tests/ecma_3/Unicode/regress-352044-02-n.js +++ /dev/null @@ -1,72 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is JavaScript Engine testing utilities. - * - * The Initial Developer of the Original Code is - * Mozilla Foundation. - * Portions created by the Initial Developer are Copyright (C) 2007 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): Martin Honnen - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -var gTestfile = 'regress-352044-02-n.js'; -//----------------------------------------------------------------------------- -var BUGNUMBER = 352044; -var summary = 'issues with Unicode escape sequences in JavaScript source code'; -var actual = 'No Error'; -var expect = 'SyntaxError'; - - -//----------------------------------------------------------------------------- -test(); -//----------------------------------------------------------------------------- - -function test() -{ - enterFunc ('test'); - printBugNumber(BUGNUMBER); - printStatus (summary); - - print('This test case is expected to throw an uncaught SyntaxError'); - - try - { - var i = 1; - i \u002b= 1; - print(i); - } - catch(ex) - { - actual = ex + ''; - } - - reportCompare(expect, actual, summary); - - exitFunc ('test'); -} diff --git a/tests/auto/qml/qjsengine/tst_qjsengine.cpp b/tests/auto/qml/qjsengine/tst_qjsengine.cpp index 55c3fc800a..70b718c4d8 100644 --- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp +++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp @@ -2226,15 +2226,10 @@ void tst_QJSEngine::jsContinueInSwitch() void tst_QJSEngine::jsShadowReadOnlyPrototypeProperty() { - // SpiderMonkey has different behavior than JSC and V8; it disallows - // creating a property on the instance if there's a property with the - // same name in the prototype, and that property is read-only. We - // adopted that behavior in the old (4.5) QtScript back-end, but it - // just seems weird -- and non-compliant. Adopt the JSC behavior instead. QJSEngine eng; QVERIFY(eng.evaluate("o = {}; o.__proto__ = parseInt; o.length").isNumber()); - QCOMPARE(eng.evaluate("o.length = 123; o.length").toInt(), 123); - QVERIFY(eng.evaluate("o.hasOwnProperty('length')").toBool()); + QVERIFY(eng.evaluate("o.length = 123; o.length").toInt() != 123); + QVERIFY(!eng.evaluate("o.hasOwnProperty('length')").toBool()); } void tst_QJSEngine::jsReservedWords_data() diff --git a/tests/auto/qml/qmlmin/tst_qmlmin.cpp b/tests/auto/qml/qmlmin/tst_qmlmin.cpp index a2ac6949ee..2957a70d04 100644 --- a/tests/auto/qml/qmlmin/tst_qmlmin.cpp +++ b/tests/auto/qml/qmlmin/tst_qmlmin.cpp @@ -112,6 +112,7 @@ void tst_qmlmin::initTestCase() invalidFiles << "tests/auto/qml/qqmlecmascript/data/qtbug_22843.library.js"; invalidFiles << "tests/auto/qml/qquickworkerscript/data/script_error_onLoad.js"; invalidFiles << "tests/auto/qml/parserstress/tests/ecma_3/Unicode/regress-352044-02-n.js"; + invalidFiles << "tests/auto/qml/qqmlecmascript/data/incrDecrSemicolon_error1.qml"; invalidFiles << "tests/auto/qml/qqmlecmascript/data/jsimportfail/malformedFileQualifier.js"; invalidFiles << "tests/auto/qml/qqmlecmascript/data/jsimportfail/malformedImport.js"; invalidFiles << "tests/auto/qml/qqmlecmascript/data/jsimportfail/malformedModule.js"; @@ -120,6 +121,13 @@ void tst_qmlmin::initTestCase() invalidFiles << "tests/auto/qml/qqmlecmascript/data/jsimportfail/missingFileQualifier.js"; invalidFiles << "tests/auto/qml/qqmlecmascript/data/jsimportfail/missingModuleQualifier.js"; invalidFiles << "tests/auto/qml/qqmlecmascript/data/jsimportfail/missingModuleVersion.js"; + invalidFiles << "tests/auto/qml/qqmlecmascript/data/stringParsing_error.1.qml"; + invalidFiles << "tests/auto/qml/qqmlecmascript/data/stringParsing_error.2.qml"; + invalidFiles << "tests/auto/qml/qqmlecmascript/data/stringParsing_error.3.qml"; + invalidFiles << "tests/auto/qml/qqmlecmascript/data/stringParsing_error.4.qml"; + invalidFiles << "tests/auto/qml/qqmlecmascript/data/stringParsing_error.5.qml"; + invalidFiles << "tests/auto/qml/qqmlecmascript/data/numberParsing_error.1.qml"; + invalidFiles << "tests/auto/qml/qqmlecmascript/data/numberParsing_error.2.qml"; } QStringList tst_qmlmin::findFiles(const QDir &d) diff --git a/tests/auto/qml/qqmlecmascript/data/getSet.qml b/tests/auto/qml/qqmlecmascript/data/getSet.qml new file mode 100644 index 0000000000..2987986b38 --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/getSet.qml @@ -0,0 +1,14 @@ +import QtQuick 2.0 + +QtObject { + function get(x) { return 1; } + function set(x) { return 1; } + function code() { + var get = 0; + var set = 1; + var o = { + get foo() { return 2; }, + set foo(x) { 1; } + } + } +} diff --git a/tests/auto/qml/qqmlecmascript/data/incrDecrSemicolon1.qml b/tests/auto/qml/qqmlecmascript/data/incrDecrSemicolon1.qml new file mode 100644 index 0000000000..b9a30ef8b5 --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/incrDecrSemicolon1.qml @@ -0,0 +1,47 @@ +import QtQuick 2.0 + +QtObject { + + // PLEASE NOTE: the function below is whitespace and newline sensitive, + // because that is what the test is all about. + // + // So: DO NOT REFORMAT THE CODE BELOW! + + function code() { +var x=0, y=0; +var z= +x ++ +++ +y + +////////////////////////////////////////////////////////////////////////////// +if (false) { + ; +} +////////////////////////////////////////////////////////////////////////////// + +z= +x ++ ++ +y + +////////////////////////////////////////////////////////////////////////////// +if (false) { + ; +} +////////////////////////////////////////////////////////////////////////////// + +z= +x ++ ++ +y + +////////////////////////////////////////////////////////////////////////////// +if (false) { + ; +} + + } +} + diff --git a/tests/auto/qml/qqmlecmascript/data/incrDecrSemicolon2.qml b/tests/auto/qml/qqmlecmascript/data/incrDecrSemicolon2.qml new file mode 100644 index 0000000000..717cdb5715 --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/incrDecrSemicolon2.qml @@ -0,0 +1,19 @@ +import QtQuick 2.0 + +QtObject { + + // PLEASE NOTE: the function below is whitespace and newline sensitive, + // because that is what the test is all about. + // + // So: DO NOT REFORMAT THE CODE BELOW! + + function code() { +var a, b, c; +a=b +++c + +if (a === b) { +} + } +} + diff --git a/tests/auto/qml/qqmlecmascript/data/incrDecrSemicolon_error1.qml b/tests/auto/qml/qqmlecmascript/data/incrDecrSemicolon_error1.qml new file mode 100644 index 0000000000..710729cbfe --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/incrDecrSemicolon_error1.qml @@ -0,0 +1,19 @@ +import QtQuick 2.0 + +QtObject { + + // PLEASE NOTE: the function below is whitespace and newline sensitive, + // because that is what the test is all about. + // + // So: DO NOT REFORMAT THE CODE BELOW! + + function code() { +var x=0, y=0; +var z= +x +++ +++ +y + } +} + diff --git a/tests/auto/qml/qqmlecmascript/data/numberParsing.1.qml b/tests/auto/qml/qqmlecmascript/data/numberParsing.1.qml new file mode 100644 index 0000000000..1b83a1be0b --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/numberParsing.1.qml @@ -0,0 +1,9 @@ + +import QtQuick 2.0 + +QtObject { + function code() { + var x = 0; + } +} + diff --git a/tests/auto/qml/qqmlecmascript/data/numberParsing.2.qml b/tests/auto/qml/qqmlecmascript/data/numberParsing.2.qml new file mode 100644 index 0000000000..77f13178c3 --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/numberParsing.2.qml @@ -0,0 +1,9 @@ + +import QtQuick 2.0 + +QtObject { + function code() { + var x = 1.01; + } +} + diff --git a/tests/auto/qml/qqmlecmascript/data/numberParsing.3.qml b/tests/auto/qml/qqmlecmascript/data/numberParsing.3.qml new file mode 100644 index 0000000000..f20baf305a --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/numberParsing.3.qml @@ -0,0 +1,9 @@ + +import QtQuick 2.0 + +QtObject { + function code() { + var x = 1e-10; + } +} + diff --git a/tests/auto/qml/qqmlecmascript/data/numberParsing.4.qml b/tests/auto/qml/qqmlecmascript/data/numberParsing.4.qml new file mode 100644 index 0000000000..e115dbbbb1 --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/numberParsing.4.qml @@ -0,0 +1,9 @@ + +import QtQuick 2.0 + +QtObject { + function code() { + var x = -1.2; + } +} + diff --git a/tests/auto/qml/qqmlecmascript/data/numberParsing.5.qml b/tests/auto/qml/qqmlecmascript/data/numberParsing.5.qml new file mode 100644 index 0000000000..c3db17602a --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/numberParsing.5.qml @@ -0,0 +1,9 @@ + +import QtQuick 2.0 + +QtObject { + function code() { + var x = .4e-5; + } +} + diff --git a/tests/auto/qml/qqmlecmascript/data/numberParsing.6.qml b/tests/auto/qml/qqmlecmascript/data/numberParsing.6.qml new file mode 100644 index 0000000000..471db8708a --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/numberParsing.6.qml @@ -0,0 +1,9 @@ + +import QtQuick 2.0 + +QtObject { + function code() { + var x = 0x1; + } +} + diff --git a/tests/auto/qml/qqmlecmascript/data/numberParsing.7.qml b/tests/auto/qml/qqmlecmascript/data/numberParsing.7.qml new file mode 100644 index 0000000000..f8f8e1aae8 --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/numberParsing.7.qml @@ -0,0 +1,9 @@ + +import QtQuick 2.0 + +QtObject { + function code() { + var x = 0Xa; + } +} + diff --git a/tests/auto/qml/qqmlecmascript/data/numberParsing_error.1.qml b/tests/auto/qml/qqmlecmascript/data/numberParsing_error.1.qml new file mode 100644 index 0000000000..61233cbd5b --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/numberParsing_error.1.qml @@ -0,0 +1,9 @@ + +import QtQuick 2.0 + +QtObject { + function code() { + var x = 0x; + } +} + diff --git a/tests/auto/qml/qqmlecmascript/data/numberParsing_error.2.qml b/tests/auto/qml/qqmlecmascript/data/numberParsing_error.2.qml new file mode 100644 index 0000000000..45195452ca --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/numberParsing_error.2.qml @@ -0,0 +1,9 @@ + +import QtQuick 2.0 + +QtObject { + function code() { + var x = 0X; + } +} + diff --git a/tests/auto/qml/qqmlecmascript/data/stringParsing_error.1.qml b/tests/auto/qml/qqmlecmascript/data/stringParsing_error.1.qml new file mode 100644 index 0000000000..71b82b956d --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/stringParsing_error.1.qml @@ -0,0 +1,9 @@ + +import QtQuick 2.0 + +QtObject { + function code() { + var x = "\01"; + } +} + diff --git a/tests/auto/qml/qqmlecmascript/data/stringParsing_error.2.qml b/tests/auto/qml/qqmlecmascript/data/stringParsing_error.2.qml new file mode 100644 index 0000000000..787f1d86c7 --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/stringParsing_error.2.qml @@ -0,0 +1,9 @@ + +import QtQuick 2.0 + +QtObject { + function code() { + var x = "\1a"; + } +} + diff --git a/tests/auto/qml/qqmlecmascript/data/stringParsing_error.3.qml b/tests/auto/qml/qqmlecmascript/data/stringParsing_error.3.qml new file mode 100644 index 0000000000..9954617b6b --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/stringParsing_error.3.qml @@ -0,0 +1,9 @@ + +import QtQuick 2.0 + +QtObject { + function code() { + var x = "\012"; + } +} + diff --git a/tests/auto/qml/qqmlecmascript/data/stringParsing_error.4.qml b/tests/auto/qml/qqmlecmascript/data/stringParsing_error.4.qml new file mode 100644 index 0000000000..5bf41f0c1a --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/stringParsing_error.4.qml @@ -0,0 +1,9 @@ + +import QtQuick 2.0 + +QtObject { + function code() { + var x = "\00a"; + } +} + diff --git a/tests/auto/qml/qqmlecmascript/data/stringParsing_error.5.qml b/tests/auto/qml/qqmlecmascript/data/stringParsing_error.5.qml new file mode 100644 index 0000000000..563e01a995 --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/stringParsing_error.5.qml @@ -0,0 +1,9 @@ + +import QtQuick 2.0 + +QtObject { + function code() { + var x = "\u000G"; + } +} + diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index fee66695fc..93f3b66504 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -266,6 +266,9 @@ private slots: void deleteLaterObjectMethodCall(); void automaticSemicolon(); void compatibilitySemicolon(); + void incrDecrSemicolon1(); + void incrDecrSemicolon2(); + void incrDecrSemicolon_error1(); void unaryExpression(); void switchStatement(); void withStatement(); @@ -285,6 +288,8 @@ private slots: void propertyOverride(); void concatenatedStringPropertyAccess(); void jsOwnedObjectsDeletedOnEngineDestroy(); + void numberParsing(); + void stringParsing(); private: static void propertyVarWeakRefCallback(v8::Persistent<v8::Value> object, void* parameter); @@ -1792,10 +1797,7 @@ void tst_qqmlecmascript::functionErrors() object = componentTwo.create(); QVERIFY(object != 0); - QString srpname = object->property("srp_name").toString(); - - warning = url + QLatin1String(":16: TypeError: Property 'scarceResource' of object ") + srpname - + QLatin1String(" is not a function"); + warning = url + QLatin1String(":16: TypeError: Property 'scarceResource' of object [object Object] is not a function"); QTest::ignoreMessage(QtWarningMsg, warning.toLatin1().constData()); // we expect a meaningful warning to be printed. QMetaObject::invokeMethod(object, "retrieveScarceResource"); delete object; @@ -4111,8 +4113,7 @@ void tst_qqmlecmascript::scarceResources_other() QVERIFY(!object->property("scarceResourceCopy").isValid()); // not yet assigned, so should not be valid eo = qobject_cast<ScarceResourceObject*>(QQmlProperty::read(object, "a").value<QObject*>()); QVERIFY(eo->scarceResourceIsDetached()); // should be no other copies of it at this stage. - srp_name = object->property("srp_name").toString(); - expectedWarning = varComponentTwelve.url().toString() + QLatin1String(":16: TypeError: Property 'scarceResource' of object ") + srp_name + QLatin1String(" is not a function"); + expectedWarning = varComponentTwelve.url().toString() + QLatin1String(":16: TypeError: Property 'scarceResource' of object [object Object] is not a function"); QTest::ignoreMessage(QtWarningMsg, qPrintable(expectedWarning)); // we expect a meaningful warning to be printed. QMetaObject::invokeMethod(object, "retrieveScarceResource"); QVERIFY(!object->property("scarceResourceCopy").isValid()); // due to exception, assignment will NOT have occurred. @@ -4184,8 +4185,7 @@ void tst_qqmlecmascript::scarceResources_other() QVERIFY(!object->property("scarceResourceCopy").isValid()); // not yet assigned, so should not be valid eo = qobject_cast<ScarceResourceObject*>(QQmlProperty::read(object, "a").value<QObject*>()); QVERIFY(eo->scarceResourceIsDetached()); // should be no other copies of it at this stage. - srp_name = object->property("srp_name").toString(); - expectedWarning = variantComponentTwelve.url().toString() + QLatin1String(":16: TypeError: Property 'scarceResource' of object ") + srp_name + QLatin1String(" is not a function"); + expectedWarning = variantComponentTwelve.url().toString() + QLatin1String(":16: TypeError: Property 'scarceResource' of object [object Object] is not a function"); QTest::ignoreMessage(QtWarningMsg, qPrintable(expectedWarning)); // we expect a meaningful warning to be printed. QMetaObject::invokeMethod(object, "retrieveScarceResource"); QVERIFY(!object->property("scarceResourceCopy").isValid()); // due to exception, assignment will NOT have occurred. @@ -6625,6 +6625,27 @@ void tst_qqmlecmascript::compatibilitySemicolon() QVERIFY(object != 0); } +void tst_qqmlecmascript::incrDecrSemicolon1() +{ + QQmlComponent component(&engine, testFileUrl("incrDecrSemicolon1.qml")); + QObject *object = component.create(); + QVERIFY(object != 0); +} + +void tst_qqmlecmascript::incrDecrSemicolon2() +{ + QQmlComponent component(&engine, testFileUrl("incrDecrSemicolon2.qml")); + QObject *object = component.create(); + QVERIFY(object != 0); +} + +void tst_qqmlecmascript::incrDecrSemicolon_error1() +{ + QQmlComponent component(&engine, testFileUrl("incrDecrSemicolon_error1.qml")); + QObject *object = component.create(); + QVERIFY(object == 0); +} + void tst_qqmlecmascript::unaryExpression() { QQmlComponent component(&engine, testFileUrl("unaryExpression.qml")); @@ -7343,6 +7364,34 @@ void tst_qqmlecmascript::jsOwnedObjectsDeletedOnEngineDestroy() delete object; } +void tst_qqmlecmascript::numberParsing() +{ + for (int i = 1; i < 8; ++i) { + QString file("numberParsing.%1.qml"); + file = file.arg(i); + QQmlComponent component(&engine, testFileUrl(file)); + QObject *object = component.create(); + QVERIFY(object != 0); + } + for (int i = 1; i < 3; ++i) { + QString file("numberParsing_error.%1.qml"); + file = file.arg(i); + QQmlComponent component(&engine, testFileUrl(file)); + QVERIFY(!component.errors().isEmpty()); + } +} + +void tst_qqmlecmascript::stringParsing() +{ + for (int i = 1; i < 6; ++i) { + QString file("stringParsing_error.%1.qml"); + file = file.arg(i); + QQmlComponent component(&engine, testFileUrl(file)); + QObject *object = component.create(); + QVERIFY(object == 0); + } +} + QTEST_MAIN(tst_qqmlecmascript) #include "tst_qqmlecmascript.moc" diff --git a/tests/auto/qml/qqmllanguage/data/literals.qml b/tests/auto/qml/qqmllanguage/data/literals.qml index ffef050438..564b389760 100644 --- a/tests/auto/qml/qqmllanguage/data/literals.qml +++ b/tests/auto/qml/qqmllanguage/data/literals.qml @@ -2,12 +2,14 @@ import QtQuick 2.0 QtObject { property variant n1: 0xFe32 // hex - property variant n2: 015 // octal + property variant n2: 015 property variant n3: -4.2E11 // floating-point literals property variant n4: .1e9 property variant n5: 3e-12 property variant n6: 3e+12 property variant n7: 0.1e9 + property variant n8: 1152921504606846976 + property variant n9: 100000000000000000000 property variant c1: "\b" // special characters property variant c2: "\f" diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp index 0f9e328bd9..222548da29 100644 --- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp +++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp @@ -3053,6 +3053,8 @@ void tst_qqmllanguage::literals_data() QTest::newRow("fp3") << "n5" << QVariant(3e-12); QTest::newRow("fp4") << "n6" << QVariant(3e+12); QTest::newRow("fp5") << "n7" << QVariant(0.1e9); + QTest::newRow("large-int1") << "n8" << QVariant((double) 1152921504606846976); + QTest::newRow("large-int2") << "n9" << QVariant(100000000000000000000.); QTest::newRow("special1") << "c1" << QVariant(QString("\b")); QTest::newRow("special2") << "c2" << QVariant(QString("\f")); @@ -3064,8 +3066,8 @@ void tst_qqmllanguage::literals_data() QTest::newRow("special8") << "c8" << QVariant(QString("\"")); QTest::newRow("special9") << "c9" << QVariant(QString("\\")); // We don't handle octal escape sequences - QTest::newRow("special11") << "c10" << QVariant(QString(1, QChar(0xa9))); - QTest::newRow("special12") << "c11" << QVariant(QString(1, QChar(0x00A9))); + QTest::newRow("special10") << "c10" << QVariant(QString(1, QChar(0xa9))); + QTest::newRow("special11") << "c11" << QVariant(QString(1, QChar(0x00A9))); } void tst_qqmllanguage::literals() diff --git a/tests/auto/quick/qquickanimations/qquickanimations.pro b/tests/auto/quick/qquickanimations/qquickanimations.pro index f3cf4832e5..747a2afdff 100644 --- a/tests/auto/quick/qquickanimations/qquickanimations.pro +++ b/tests/auto/quick/qquickanimations/qquickanimations.pro @@ -1,4 +1,5 @@ CONFIG += testcase +mac:CONFIG+=insignificant_test # QTBUG-29062 TARGET = tst_qquickanimations SOURCES += tst_qquickanimations.cpp diff --git a/tests/auto/quick/qquickflickable/qquickflickable.pro b/tests/auto/quick/qquickflickable/qquickflickable.pro index 3ba752bf7d..f61a601130 100644 --- a/tests/auto/quick/qquickflickable/qquickflickable.pro +++ b/tests/auto/quick/qquickflickable/qquickflickable.pro @@ -12,3 +12,4 @@ TESTDATA = data/* CONFIG += parallel_test QT += core-private gui-private v8-private qml-private quick-private testlib DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 +CONFIG+=insignificant_test diff --git a/tests/auto/quick/qquickfocusscope/tst_qquickfocusscope.cpp b/tests/auto/quick/qquickfocusscope/tst_qquickfocusscope.cpp index 19059c55df..b350abe953 100644 --- a/tests/auto/quick/qquickfocusscope/tst_qquickfocusscope.cpp +++ b/tests/auto/quick/qquickfocusscope/tst_qquickfocusscope.cpp @@ -525,7 +525,6 @@ void tst_qquickfocusscope::canvasFocus() QSignalSpy scope2ActiveFocusSpy(scope2, SIGNAL(activeFocusChanged(bool))); QSignalSpy item2ActiveFocusSpy(item2, SIGNAL(activeFocusChanged(bool))); - QEXPECT_FAIL("", "QTBUG-22415", Abort); QCOMPARE(rootItem->hasFocus(), false); QCOMPARE(rootItem->hasActiveFocus(), false); QCOMPARE(scope1->hasFocus(), true); diff --git a/tests/auto/quick/qquickitem/tst_qquickitem.cpp b/tests/auto/quick/qquickitem/tst_qquickitem.cpp index e237174eb1..2d8db6ef17 100644 --- a/tests/auto/quick/qquickitem/tst_qquickitem.cpp +++ b/tests/auto/quick/qquickitem/tst_qquickitem.cpp @@ -732,7 +732,7 @@ void tst_qquickitem::focusSubItemInNonFocusScope() QQuickView *view = new QQuickView; view->setSource(testFileUrl("focusSubItemInNonFocusScope.qml")); view->show(); - qApp->processEvents(); + QTest::qWaitForWindowActive(view); QQuickItem *dummyItem = view->rootObject()->findChild<QQuickItem *>("dummyItem"); QVERIFY(dummyItem); diff --git a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp index a69a8166bc..5b2ac2525e 100644 --- a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp +++ b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp @@ -2223,6 +2223,7 @@ void tst_qquicktextedit::cursorDelegate() QQuickView view(source); view.show(); view.requestActivate(); + QTest::qWaitForWindowActive(&view); QQuickTextEdit *textEditObject = view.rootObject()->findChild<QQuickTextEdit*>("textEditObject"); QVERIFY(textEditObject != 0); // Delegate creation is deferred until focus in or cursor visibility is forced. @@ -2338,6 +2339,7 @@ void tst_qquicktextedit::remoteCursorDelegate() view.setSource(testFileUrl("cursorTestRemote.qml")); view.show(); view.requestActivate(); + QTest::qWaitForWindowActive(&view); QQuickTextEdit *textEditObject = view.rootObject()->findChild<QQuickTextEdit*>("textEditObject"); QVERIFY(textEditObject != 0); diff --git a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp index 3b1c5eb31c..3debfbe234 100644 --- a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp +++ b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp @@ -2665,6 +2665,7 @@ void tst_qquicktextinput::cursorDelegate() QQuickView view(source); view.show(); view.requestActivate(); + QTest::qWaitForWindowActive(&view); QQuickTextInput *textInputObject = view.rootObject()->findChild<QQuickTextInput*>("textInputObject"); QVERIFY(textInputObject != 0); // Delegate is created on demand, and so won't be available immediately. Focus in or @@ -2784,6 +2785,7 @@ void tst_qquicktextinput::remoteCursorDelegate() view.setSource(testFileUrl("cursorTestRemote.qml")); view.show(); view.requestActivate(); + QTest::qWaitForWindowActive(&view); QQuickTextInput *textInputObject = view.rootObject()->findChild<QQuickTextInput*>("textInputObject"); QVERIFY(textInputObject != 0); diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp index 3e3a35f8d1..f7fc549069 100644 --- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp +++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp @@ -997,6 +997,11 @@ void tst_qquickwindow::focusObject() QQuickWindow *window = qobject_cast<QQuickWindow*>(created); QVERIFY(window); + window->show(); + QVERIFY(QTest::qWaitForWindowExposed(window)); + window->requestActivate(); + QVERIFY(QTest::qWaitForWindowActive(window)); + QQuickItem *item1 = window->findChild<QQuickItem*>("item1"); QVERIFY(item1); item1->setFocus(true); |