Index: test/cctest/interpreter/test-interpreter.cc |
diff --git a/test/cctest/interpreter/test-interpreter.cc b/test/cctest/interpreter/test-interpreter.cc |
index 3db22ece19d4972925bd031dc6d6315f16c62f5b..a0bba0ac0ff222266f320510fb82820615732140 100644 |
--- a/test/cctest/interpreter/test-interpreter.cc |
+++ b/test/cctest/interpreter/test-interpreter.cc |
@@ -2854,7 +2854,27 @@ TEST(InterpreterForIn) { |
" }\n" |
" return flags;\n" |
" }", |
- 0}}; |
+ 0}, |
+ {"function f() {\n" |
+ " var data = {x:23, y:34};\n" |
+ " var result = 0;\n" |
+ " var o = {};\n" |
+ " var arr = [o];\n" |
+ " for (arr[0].p in data)\n" // This is to test if value is loaded |
+ " result += data[arr[0].p];\n" // back from accumulator before storing |
+ " return result;\n" // named properties. |
+ "}", |
+ 57}, |
+ {"function f() {\n" |
+ " var data = {x:23, y:34};\n" |
+ " var result = 0;\n" |
+ " var o = {};\n" |
+ " var i = 0;\n" |
+ " for (o[i++] in data)\n" // This is to test if value is loaded |
+ " result += data[o[i-1]];\n" // back from accumulator before |
+ " return result;\n" // storing keyed properties. |
+ "}", |
+ 57}}; |
for (size_t i = 0; i < arraysize(for_in_samples); i++) { |
InterpreterTester tester(handles.main_isolate(), for_in_samples[i].first); |