Index: test/mjsunit/strong/for-in.js |
diff --git a/test/mjsunit/strong/for-in.js b/test/mjsunit/strong/for-in.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..802835e5caa71018f1546836f6658098458c7ec4 |
--- /dev/null |
+++ b/test/mjsunit/strong/for-in.js |
@@ -0,0 +1,13 @@ |
+// Copyright 2015 the V8 project authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+// Flags: --strong-mode |
+ |
+(function NoForInStatement() { |
+ assertThrows("'use strong'; for (x in []);", SyntaxError); |
+ assertThrows("'use strong'; for (let x in []);", SyntaxError); |
+ assertThrows("'use strong'; for (const x in []);", SyntaxError); |
+ assertThrows("'use strong'; for (var x in []);", SyntaxError); |
+ assertThrows("'use strong'; for (var x = 0 in []);", SyntaxError); |
marja
2015/02/19 12:34:22
Can we has tests that for of still works?
(In gen
rossberg
2015/02/19 13:23:05
Done. Also removed the nonsensical var tests, sinc
|
+})(); |