Title: [156920] trunk/LayoutTests

Diff

Modified: trunk/LayoutTests/ChangeLog (156919 => 156920)


--- trunk/LayoutTests/ChangeLog	2013-10-04 22:45:09 UTC (rev 156919)
+++ trunk/LayoutTests/ChangeLog	2013-10-04 22:45:37 UTC (rev 156920)
@@ -1,3 +1,13 @@
+2013-10-04  Oliver Hunt  <[email protected]>
+
+        Update all the tests, and include new file.
+        
+        * js/script-tests/basic-for-of.js: Added.
+        * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.3_T4-expected.txt:
+        * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.3_T5-expected.txt:
+        * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.3_T6-expected.txt:
+        * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.3_T7-expected.txt:
+
 2013-10-04  Bear Travis  <[email protected]>
 
         [CSS Shapes] Basic shapes should be animatable for shape-outside

Added: trunk/LayoutTests/js/script-tests/basic-for-of.js (0 => 156920)


--- trunk/LayoutTests/js/script-tests/basic-for-of.js	                        (rev 0)
+++ trunk/LayoutTests/js/script-tests/basic-for-of.js	2013-10-04 22:45:37 UTC (rev 156920)
@@ -0,0 +1,62 @@
+description(
+"This test checks the behavior of the for-of construct."
+);
+
+
+var testArray = [1,2,3,4,5,6]
+
+var i = 0;
+for (var value of testArray.values())
+    shouldBe("value", "testArray[" + i++ + "]")
+
+shouldBe("testArray.length", String(i))
+
+var i = 0;
+for (var value of testArray)
+    shouldBe("value", "testArray[" + i++ + "]")
+
+shouldBe("testArray.length", String(i))
+
+var i = 0;
+for (var key of testArray.keys())
+    shouldBe("key", "" + i++ )
+
+shouldBe("testArray.length", String(i))
+
+var i = 0;
+for (this.prop1 of testArray.keys())
+    shouldBe("this.prop1", "" + i++ )
+
+shouldBe("testArray.length", String(i))
+
+var i = 0;
+var prop2 = "asdf"
+for (this[prop2] of testArray.keys())
+    shouldBe("this[prop2]", "" + i++ )
+
+shouldBe("testArray.length", String(i))
+
+
+var i = 0;
+for (var [key, value] of testArray.entries()) {
+    shouldBe("key", "" + i++)
+    shouldBe("value", "" + i)
+}
+
+shouldBe("testArray.length", String(i))
+
+var i = 0;
+for (var [key, value] of testArray.entries()) {
+    shouldBe("value", "testArray[key]")
+    shouldBe("key", "i")
+    i++
+    if (i % 2 == 0)
+        testArray[i] *= 2;
+    if (i < 4)
+        testArray.push(testArray.length)
+    if (i == 4)
+        delete testArray[4]
+    if (i == 5)
+        testArray[4] = 5
+}
+shouldBe("testArray.length", String(i))

Modified: trunk/LayoutTests/sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.3_T4-expected.txt (156919 => 156920)


--- trunk/LayoutTests/sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.3_T4-expected.txt	2013-10-04 22:45:09 UTC (rev 156919)
+++ trunk/LayoutTests/sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.3_T4-expected.txt	2013-10-04 22:45:37 UTC (rev 156920)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 81: SyntaxError: Expected token 'in'
+CONSOLE MESSAGE: line 81: SyntaxError: Expected either 'in' or 'of' in enumeration syntax
 S7.9_A6.3_T4
 
 PASS Expected parsing failure

Modified: trunk/LayoutTests/sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.3_T5-expected.txt (156919 => 156920)


--- trunk/LayoutTests/sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.3_T5-expected.txt	2013-10-04 22:45:09 UTC (rev 156919)
+++ trunk/LayoutTests/sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.3_T5-expected.txt	2013-10-04 22:45:37 UTC (rev 156920)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 80: SyntaxError: Expected token 'in'
+CONSOLE MESSAGE: line 80: SyntaxError: Expected either 'in' or 'of' in enumeration syntax
 S7.9_A6.3_T5
 
 PASS Expected parsing failure

Modified: trunk/LayoutTests/sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.3_T6-expected.txt (156919 => 156920)


--- trunk/LayoutTests/sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.3_T6-expected.txt	2013-10-04 22:45:09 UTC (rev 156919)
+++ trunk/LayoutTests/sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.3_T6-expected.txt	2013-10-04 22:45:37 UTC (rev 156920)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 81: SyntaxError: Expected token 'in'
+CONSOLE MESSAGE: line 81: SyntaxError: Expected either 'in' or 'of' in enumeration syntax
 S7.9_A6.3_T6
 
 PASS Expected parsing failure

Modified: trunk/LayoutTests/sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.3_T7-expected.txt (156919 => 156920)


--- trunk/LayoutTests/sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.3_T7-expected.txt	2013-10-04 22:45:09 UTC (rev 156919)
+++ trunk/LayoutTests/sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.3_T7-expected.txt	2013-10-04 22:45:37 UTC (rev 156920)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 81: SyntaxError: Expected token 'in'
+CONSOLE MESSAGE: line 81: SyntaxError: Expected either 'in' or 'of' in enumeration syntax
 S7.9_A6.3_T7
 
 PASS Expected parsing failure
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to