Fix infinite looping test262 test
authorkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 24 Sep 2017 00:46:49 +0000 (00:46 +0000)
committerkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 24 Sep 2017 00:46:49 +0000 (00:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=177412

Reviewed by Yusuke Suzuki.

This test was poorly designed since failing it would cause the vm
to inifinite loop. I've fixed it locally and will fix it on github pending
the results of next weeks tc39 meeting.

* test262.yaml:
* test262/test/language/statements/for-of/iterator-next-reference.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222428 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JSTests/ChangeLog
JSTests/test262.yaml
JSTests/test262/test/language/statements/for-of/iterator-next-reference.js

index d96a2f8..82ef16d 100644 (file)
@@ -1,3 +1,17 @@
+2017-09-23  Keith Miller  <keith_miller@apple.com>
+
+        Fix infinite looping test262 test
+        https://bugs.webkit.org/show_bug.cgi?id=177412
+
+        Reviewed by Yusuke Suzuki.
+
+        This test was poorly designed since failing it would cause the vm
+        to inifinite loop. I've fixed it locally and will fix it on github pending
+        the results of next weeks tc39 meeting.
+
+        * test262.yaml:
+        * test262/test/language/statements/for-of/iterator-next-reference.js:
+
 2017-09-23  Joseph Pecoraro  <pecoraro@apple.com>
 
         test262: $.agent became $262.agent in test262 update
index d1c75cb..27440f1 100644 (file)
 - path: test262/test/language/statements/for-of/iterator-next-error.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/language/statements/for-of/iterator-next-reference.js
-  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
+  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
 - path: test262/test/language/statements/for-of/iterator-next-reference.js
-  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
+  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/language/statements/for-of/iterator-next-result-done-attr.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
 - path: test262/test/language/statements/for-of/iterator-next-result-done-attr.js
index 3fd8eba..598ec36 100644 (file)
@@ -23,6 +23,9 @@ invocationCount = 0;
 for (var x of iterable) {
   assert.sameValue(x, 45);
 
+  if (iterationCount != 0)
+    $ERROR("iterated too many times");
+
   iterator.next = function() {
     invocationCount++;