Title: [109485] trunk/LayoutTests
Revision
109485
Author
[email protected]
Date
2012-03-01 19:10:44 -0800 (Thu, 01 Mar 2012)

Log Message

Fix test checking for incorrect results.

Rubber stamped by Sam Weinig.

* fast/js/mozilla/strict/13.1-expected.txt:
* fast/js/mozilla/strict/script-tests/13.1.js:
    - This test uses destructuring, this didn't make it into ES5.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (109484 => 109485)


--- trunk/LayoutTests/ChangeLog	2012-03-02 03:08:23 UTC (rev 109484)
+++ trunk/LayoutTests/ChangeLog	2012-03-02 03:10:44 UTC (rev 109485)
@@ -1,5 +1,15 @@
 2012-03-01  Gavin Barraclough  <[email protected]>
 
+        Fix test checking for incorrect results.
+
+        Rubber stamped by Sam Weinig.
+
+        * fast/js/mozilla/strict/13.1-expected.txt:
+        * fast/js/mozilla/strict/script-tests/13.1.js:
+            - This test uses destructuring, this didn't make it into ES5.
+
+2012-03-01  Gavin Barraclough  <[email protected]>
+
         Fix typo in test, causing test to fail.
 
         Rubber stamped by Sam Weinig.

Modified: trunk/LayoutTests/fast/js/mozilla/strict/13.1-expected.txt (109484 => 109485)


--- trunk/LayoutTests/fast/js/mozilla/strict/13.1-expected.txt	2012-03-02 03:08:23 UTC (rev 109484)
+++ trunk/LayoutTests/fast/js/mozilla/strict/13.1-expected.txt	2012-03-02 03:10:44 UTC (rev 109485)
@@ -10,8 +10,8 @@
 PASS Function("'use strict'; function f(a,b,c,d,e,f,g,h,d) {}") threw exception of type SyntaxError.
 PASS !!Function("function f(a,b,c,d,e,f,g,h,d) {}") is true
 PASS true === true
-FAIL !!Function("'use strict'; function f([x,y]) {}") should be true. Threw exception SyntaxError: Expected an identifier but found '[' instead
-FAIL !!Function("function f([x,y]) {}") should be true. Threw exception SyntaxError: Expected an identifier but found '[' instead
+PASS Function("'use strict'; function f([x,y]) {}") threw exception of type SyntaxError.
+PASS Function("function f([x,y]) {}") threw exception of type SyntaxError.
 PASS true === true
 PASS Function("'use strict'; function f([x,x]){}") threw exception of type SyntaxError.
 PASS Function("function f([x,x]){}") threw exception of type SyntaxError.
@@ -29,19 +29,19 @@
 PASS true === true
 PASS true === true
 PASS Function("'use strict'; (function (x,x) 2)") threw exception of type SyntaxError.
-FAIL !!Function("(function (x,x) 2)") should be true. Threw exception SyntaxError: Expected token '{'
+PASS Function("(function (x,x) 2)") threw exception of type SyntaxError.
 PASS true === true
-FAIL !!Function("'use strict'; (function (x,y) 2)") should be true. Threw exception SyntaxError: Expected token '{'
-FAIL !!Function("(function (x,y) 2)") should be true. Threw exception SyntaxError: Expected token '{'
+PASS Function("'use strict'; (function (x,y) 2)") threw exception of type SyntaxError.
+PASS Function("(function (x,y) 2)") threw exception of type SyntaxError.
 PASS true === true
 PASS Function("'use strict'; function f(eval){}") threw exception of type SyntaxError.
 PASS !!Function("function f(eval){}") is true
 PASS true === true
 PASS Function("'use strict'; function f([eval]){}") threw exception of type SyntaxError.
-FAIL !!Function("function f([eval]){}") should be true. Threw exception SyntaxError: Expected an identifier but found '[' instead
+PASS Function("function f([eval]){}") threw exception of type SyntaxError.
 PASS true === true
 PASS Function("'use strict'; function f({x:eval}){}") threw exception of type SyntaxError.
-FAIL !!Function("function f({x:eval}){}") should be true. Threw exception SyntaxError: Expected an identifier but found '{' instead
+PASS Function("function f({x:eval}){}") threw exception of type SyntaxError.
 PASS true === true
 PASS Function("'use strict'; function eval(){}") threw exception of type SyntaxError.
 PASS !!Function("function eval(){}") is true
@@ -62,10 +62,10 @@
 PASS !!Function("(function f(eval){})") is true
 PASS true === true
 PASS Function("'use strict'; (function f([eval]){})") threw exception of type SyntaxError.
-FAIL !!Function("(function f([eval]){})") should be true. Threw exception SyntaxError: Expected an identifier but found '[' instead
+PASS Function("(function f([eval]){})") threw exception of type SyntaxError.
 PASS true === true
 PASS Function("'use strict'; (function f({x:eval}){})") threw exception of type SyntaxError.
-FAIL !!Function("(function f({x:eval}){})") should be true. Threw exception SyntaxError: Expected an identifier but found '{' instead
+PASS Function("(function f({x:eval}){})") threw exception of type SyntaxError.
 PASS true === true
 PASS Function("'use strict'; (function eval(){})") threw exception of type SyntaxError.
 PASS !!Function("(function eval(){})") is true
@@ -83,25 +83,25 @@
 PASS Function("(function eval(){\"use strict\";})") threw exception of type SyntaxError.
 PASS true === true
 PASS Function("'use strict'; (function f(eval) 2)") threw exception of type SyntaxError.
-FAIL !!Function("(function f(eval) 2)") should be true. Threw exception SyntaxError: Expected token '{'
+PASS Function("(function f(eval) 2)") threw exception of type SyntaxError.
 PASS true === true
 PASS Function("'use strict'; (function f([eval]) 2)") threw exception of type SyntaxError.
-FAIL !!Function("(function f([eval]) 2)") should be true. Threw exception SyntaxError: Expected an identifier but found '[' instead
+PASS Function("(function f([eval]) 2)") threw exception of type SyntaxError.
 PASS true === true
 PASS Function("'use strict'; (function f({x:eval}) 2)") threw exception of type SyntaxError.
-FAIL !!Function("(function f({x:eval}) 2)") should be true. Threw exception SyntaxError: Expected an identifier but found '{' instead
+PASS Function("(function f({x:eval}) 2)") threw exception of type SyntaxError.
 PASS true === true
 PASS Function("'use strict'; (function eval() 2)") threw exception of type SyntaxError.
-FAIL !!Function("(function eval() 2)") should be true. Threw exception SyntaxError: Expected token '{'
+PASS Function("(function eval() 2)") threw exception of type SyntaxError.
 PASS true === true
 PASS Function("'use strict'; ({set x(eval){}})") threw exception of type SyntaxError.
 PASS !!Function("({set x(eval){}})") is true
 PASS true === true
 PASS Function("'use strict'; ({set x([eval]){}})") threw exception of type SyntaxError.
-FAIL !!Function("({set x([eval]){}})") should be true. Threw exception SyntaxError: Expected an identifier but found '[' instead
+PASS Function("({set x([eval]){}})") threw exception of type SyntaxError.
 PASS true === true
 PASS Function("'use strict'; ({set x({x:eval}){}})") threw exception of type SyntaxError.
-FAIL !!Function("({set x({x:eval}){}})") should be true. Threw exception SyntaxError: Expected an identifier but found '{' instead
+PASS Function("({set x({x:eval}){}})") threw exception of type SyntaxError.
 PASS true === true
 PASS Function("'use strict'; ({set x(eval){\"use strict\";}})") threw exception of type SyntaxError.
 PASS Function("({set x(eval){\"use strict\";}})") threw exception of type SyntaxError.
@@ -116,10 +116,10 @@
 PASS !!Function("function f(arguments){}") is true
 PASS true === true
 PASS Function("'use strict'; function f([arguments]){}") threw exception of type SyntaxError.
-FAIL !!Function("function f([arguments]){}") should be true. Threw exception SyntaxError: Expected an identifier but found '[' instead
+PASS Function("function f([arguments]){}") threw exception of type SyntaxError.
 PASS true === true
 PASS Function("'use strict'; function f({x:arguments}){}") threw exception of type SyntaxError.
-FAIL !!Function("function f({x:arguments}){}") should be true. Threw exception SyntaxError: Expected an identifier but found '{' instead
+PASS Function("function f({x:arguments}){}") threw exception of type SyntaxError.
 PASS true === true
 PASS Function("'use strict'; function arguments(){}") threw exception of type SyntaxError.
 PASS !!Function("function arguments(){}") is true
@@ -140,10 +140,10 @@
 PASS !!Function("(function f(arguments){})") is true
 PASS true === true
 PASS Function("'use strict'; (function f([arguments]){})") threw exception of type SyntaxError.
-FAIL !!Function("(function f([arguments]){})") should be true. Threw exception SyntaxError: Expected an identifier but found '[' instead
+PASS Function("(function f([arguments]){})") threw exception of type SyntaxError.
 PASS true === true
 PASS Function("'use strict'; (function f({x:arguments}){})") threw exception of type SyntaxError.
-FAIL !!Function("(function f({x:arguments}){})") should be true. Threw exception SyntaxError: Expected an identifier but found '{' instead
+PASS Function("(function f({x:arguments}){})") threw exception of type SyntaxError.
 PASS true === true
 PASS Function("'use strict'; (function arguments(){})") threw exception of type SyntaxError.
 PASS !!Function("(function arguments(){})") is true
@@ -161,25 +161,25 @@
 PASS Function("(function arguments(){\"use strict\";})") threw exception of type SyntaxError.
 PASS true === true
 PASS Function("'use strict'; (function f(arguments) 2)") threw exception of type SyntaxError.
-FAIL !!Function("(function f(arguments) 2)") should be true. Threw exception SyntaxError: Expected token '{'
+PASS Function("(function f(arguments) 2)") threw exception of type SyntaxError.
 PASS true === true
 PASS Function("'use strict'; (function f([arguments]) 2)") threw exception of type SyntaxError.
-FAIL !!Function("(function f([arguments]) 2)") should be true. Threw exception SyntaxError: Expected an identifier but found '[' instead
+PASS Function("(function f([arguments]) 2)") threw exception of type SyntaxError.
 PASS true === true
 PASS Function("'use strict'; (function f({x:arguments}) 2)") threw exception of type SyntaxError.
-FAIL !!Function("(function f({x:arguments}) 2)") should be true. Threw exception SyntaxError: Expected an identifier but found '{' instead
+PASS Function("(function f({x:arguments}) 2)") threw exception of type SyntaxError.
 PASS true === true
 PASS Function("'use strict'; (function arguments() 2)") threw exception of type SyntaxError.
-FAIL !!Function("(function arguments() 2)") should be true. Threw exception SyntaxError: Expected token '{'
+PASS Function("(function arguments() 2)") threw exception of type SyntaxError.
 PASS true === true
 PASS Function("'use strict'; ({set x(arguments){}})") threw exception of type SyntaxError.
 PASS !!Function("({set x(arguments){}})") is true
 PASS true === true
 PASS Function("'use strict'; ({set x([arguments]){}})") threw exception of type SyntaxError.
-FAIL !!Function("({set x([arguments]){}})") should be true. Threw exception SyntaxError: Expected an identifier but found '[' instead
+PASS Function("({set x([arguments]){}})") threw exception of type SyntaxError.
 PASS true === true
 PASS Function("'use strict'; ({set x({x:arguments}){}})") threw exception of type SyntaxError.
-FAIL !!Function("({set x({x:arguments}){}})") should be true. Threw exception SyntaxError: Expected an identifier but found '{' instead
+PASS Function("({set x({x:arguments}){}})") threw exception of type SyntaxError.
 PASS true === true
 PASS Function("'use strict'; ({set x(arguments){\"use strict\";}})") threw exception of type SyntaxError.
 PASS Function("({set x(arguments){\"use strict\";}})") threw exception of type SyntaxError.

Modified: trunk/LayoutTests/fast/js/mozilla/strict/script-tests/13.1.js (109484 => 109485)


--- trunk/LayoutTests/fast/js/mozilla/strict/script-tests/13.1.js	2012-03-02 03:08:23 UTC (rev 109484)
+++ trunk/LayoutTests/fast/js/mozilla/strict/script-tests/13.1.js	2012-03-02 03:10:44 UTC (rev 109485)
@@ -37,9 +37,10 @@
  * SpiderMonkey has always treated duplicates in destructuring
  * patterns as an error. Strict mode should not affect this.
  */
+// Destructuring is not valid ES5 syntax.
 assertEq(testLenientAndStrict('function f([x,y]) {}',
-                              parsesSuccessfully,
-                              parsesSuccessfully),
+                              parseRaisesException(SyntaxError),
+                              parseRaisesException(SyntaxError)),
          true);
 assertEq(testLenientAndStrict('function f([x,x]){}',
                               parseRaisesException(SyntaxError),
@@ -86,13 +87,15 @@
  * The parameter lists of function expressions should not contain
  * duplicate identifiers.
  */
+// This is not valid ES5 syntax.
 assertEq(testLenientAndStrict('(function (x,x) 2)',
-                               parsesSuccessfully,
+                               parseRaisesException(SyntaxError),
                                parseRaisesException(SyntaxError)),
          true);
+// This is not valid ES5 syntax.
 assertEq(testLenientAndStrict('(function (x,y) 2)',
-                              parsesSuccessfully,
-                              parsesSuccessfully),
+                              parseRaisesException(SyntaxError),
+                              parseRaisesException(SyntaxError)),
          true);
 
 /*
@@ -113,12 +116,14 @@
                               parsesSuccessfully,
                               parseRaisesException(SyntaxError)),
          true);
+// Destructuring is not valid ES5 syntax.
 assertEq(testLenientAndStrict('function f([eval]){}',
-                              parsesSuccessfully,
+                              parseRaisesException(SyntaxError),
                               parseRaisesException(SyntaxError)),
          true);
+// Destructuring is not valid ES5 syntax.
 assertEq(testLenientAndStrict('function f({x:eval}){}',
-                              parsesSuccessfully,
+                              parseRaisesException(SyntaxError),
                               parseRaisesException(SyntaxError)),
          true);
 assertEq(testLenientAndStrict('function eval(){}',
@@ -129,10 +134,12 @@
                               parseRaisesException(SyntaxError),
                               parseRaisesException(SyntaxError)),
          true);
+// Destructuring is not valid ES5 syntax.
 assertEq(testLenientAndStrict('function f([eval]){"use strict";}',
                               parseRaisesException(SyntaxError),
                               parseRaisesException(SyntaxError)),
          true);
+// Destructuring is not valid ES5 syntax.
 assertEq(testLenientAndStrict('function f({x:eval}){"use strict";}',
                               parseRaisesException(SyntaxError),
                               parseRaisesException(SyntaxError)),
@@ -145,12 +152,14 @@
                               parsesSuccessfully,
                               parseRaisesException(SyntaxError)),
          true);
+// Destructuring is not valid ES5 syntax.
 assertEq(testLenientAndStrict('(function f([eval]){})',
-                              parsesSuccessfully,
+                              parseRaisesException(SyntaxError),
                               parseRaisesException(SyntaxError)),
          true);
+// Destructuring is not valid ES5 syntax.
 assertEq(testLenientAndStrict('(function f({x:eval}){})',
-                              parsesSuccessfully,
+                              parseRaisesException(SyntaxError),
                               parseRaisesException(SyntaxError)),
          true);
 assertEq(testLenientAndStrict('(function eval(){})',
@@ -173,32 +182,38 @@
                               parseRaisesException(SyntaxError),
                               parseRaisesException(SyntaxError)),
          true);
+// This is not valid ES5 syntax.
 assertEq(testLenientAndStrict('(function f(eval) 2)',
-                              parsesSuccessfully,
+                              parseRaisesException(SyntaxError),
                               parseRaisesException(SyntaxError)),
          true);
+// Destructuring is not valid ES5 syntax.
 assertEq(testLenientAndStrict('(function f([eval]) 2)',
-                              parsesSuccessfully,
+                              parseRaisesException(SyntaxError),
                               parseRaisesException(SyntaxError)),
          true);
+// This is not valid ES5 syntax.
 assertEq(testLenientAndStrict('(function f({x:eval}) 2)',
-                              parsesSuccessfully,
+                              parseRaisesException(SyntaxError),
                               parseRaisesException(SyntaxError)),
          true);
+// This is not valid ES5 syntax.
 assertEq(testLenientAndStrict('(function eval() 2)',
-                              parsesSuccessfully,
+                              parseRaisesException(SyntaxError),
                               parseRaisesException(SyntaxError)),
          true);
 assertEq(testLenientAndStrict('({set x(eval){}})',
                               parsesSuccessfully,
                               parseRaisesException(SyntaxError)),
          true);
+// Destructuring is not valid ES5 syntax.
 assertEq(testLenientAndStrict('({set x([eval]){}})',
-                              parsesSuccessfully,
+                              parseRaisesException(SyntaxError),
                               parseRaisesException(SyntaxError)),
          true);
+// Destructuring is not valid ES5 syntax.
 assertEq(testLenientAndStrict('({set x({x:eval}){}})',
-                              parsesSuccessfully,
+                              parseRaisesException(SyntaxError),
                               parseRaisesException(SyntaxError)),
          true);
 assertEq(testLenientAndStrict('({set x(eval){"use strict";}})',
@@ -217,12 +232,14 @@
                               parsesSuccessfully,
                               parseRaisesException(SyntaxError)),
          true);
+// Destructuring is not valid ES5 syntax.
 assertEq(testLenientAndStrict('function f([arguments]){}',
-                              parsesSuccessfully,
+                              parseRaisesException(SyntaxError),
                               parseRaisesException(SyntaxError)),
          true);
+// Destructuring is not valid ES5 syntax.
 assertEq(testLenientAndStrict('function f({x:arguments}){}',
-                              parsesSuccessfully,
+                              parseRaisesException(SyntaxError),
                               parseRaisesException(SyntaxError)),
          true);
 assertEq(testLenientAndStrict('function arguments(){}',
@@ -233,6 +250,7 @@
                               parseRaisesException(SyntaxError),
                               parseRaisesException(SyntaxError)),
          true);
+// Destructuring is not valid ES5 syntax.
 assertEq(testLenientAndStrict('function f([arguments]){"use strict";}',
                               parseRaisesException(SyntaxError),
                               parseRaisesException(SyntaxError)),
@@ -249,12 +267,14 @@
                               parsesSuccessfully,
                               parseRaisesException(SyntaxError)),
          true);
+// Destructuring is not valid ES5 syntax.
 assertEq(testLenientAndStrict('(function f([arguments]){})',
-                              parsesSuccessfully,
+                              parseRaisesException(SyntaxError),
                               parseRaisesException(SyntaxError)),
          true);
+// Destructuring is not valid ES5 syntax.
 assertEq(testLenientAndStrict('(function f({x:arguments}){})',
-                              parsesSuccessfully,
+                              parseRaisesException(SyntaxError),
                               parseRaisesException(SyntaxError)),
          true);
 assertEq(testLenientAndStrict('(function arguments(){})',
@@ -277,32 +297,38 @@
                               parseRaisesException(SyntaxError),
                               parseRaisesException(SyntaxError)),
          true);
+// This is not valid ES5 syntax.
 assertEq(testLenientAndStrict('(function f(arguments) 2)',
-                              parsesSuccessfully,
+                              parseRaisesException(SyntaxError),
                               parseRaisesException(SyntaxError)),
          true);
+// Destructuring is not valid ES5 syntax.
 assertEq(testLenientAndStrict('(function f([arguments]) 2)',
-                              parsesSuccessfully,
+                              parseRaisesException(SyntaxError),
                               parseRaisesException(SyntaxError)),
          true);
+// Destructuring is not valid ES5 syntax.
 assertEq(testLenientAndStrict('(function f({x:arguments}) 2)',
-                              parsesSuccessfully,
+                              parseRaisesException(SyntaxError),
                               parseRaisesException(SyntaxError)),
          true);
+// This is not valid ES5 syntax.
 assertEq(testLenientAndStrict('(function arguments() 2)',
-                              parsesSuccessfully,
+                              parseRaisesException(SyntaxError),
                               parseRaisesException(SyntaxError)),
          true);
 assertEq(testLenientAndStrict('({set x(arguments){}})',
                               parsesSuccessfully,
                               parseRaisesException(SyntaxError)),
          true);
+// Destructuring is not valid ES5 syntax.
 assertEq(testLenientAndStrict('({set x([arguments]){}})',
-                              parsesSuccessfully,
+                              parseRaisesException(SyntaxError),
                               parseRaisesException(SyntaxError)),
          true);
+// Destructuring is not valid ES5 syntax.
 assertEq(testLenientAndStrict('({set x({x:arguments}){}})',
-                              parsesSuccessfully,
+                              parseRaisesException(SyntaxError),
                               parseRaisesException(SyntaxError)),
          true);
 assertEq(testLenientAndStrict('({set x(arguments){"use strict";}})',
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to