Index: test/cctest/compiler/test-run-jsbranches.cc |
diff --git a/test/cctest/compiler/test-run-jsbranches.cc b/test/cctest/compiler/test-run-jsbranches.cc |
index 502295e471965d72fff295ace1155b6bee948814..76cb9a28436b0e29dc7bcd8663b1029c40c154a7 100644 |
--- a/test/cctest/compiler/test-run-jsbranches.cc |
+++ b/test/cctest/compiler/test-run-jsbranches.cc |
@@ -104,70 +104,6 @@ TEST(ForStatement) { |
T.CheckCall(T.Val("str"), T.Val("str"), T.Val("str")); |
} |
- |
-static void TestForIn(const char* code) { |
- FunctionTester T(code); |
- T.CheckCall(T.undefined(), T.undefined()); |
- T.CheckCall(T.undefined(), T.null()); |
- T.CheckCall(T.undefined(), T.NewObject("({})")); |
- T.CheckCall(T.undefined(), T.Val(1)); |
- T.CheckCall(T.Val("2"), T.Val("str")); |
- T.CheckCall(T.Val("a"), T.NewObject("({'a' : 1})")); |
- T.CheckCall(T.Val("2"), T.NewObject("([1, 2, 3])")); |
- T.CheckCall(T.Val("a"), T.NewObject("({'a' : 1, 'b' : 1})"), T.Val("b")); |
- T.CheckCall(T.Val("1"), T.NewObject("([1, 2, 3])"), T.Val("2")); |
-} |
- |
- |
-TEST(ForInStatement) { |
- // Variable assignment. |
- TestForIn( |
- "(function(a, b) {" |
- "var last;" |
- "for (var x in a) {" |
- " if (b) { delete a[b]; b = undefined; }" |
- " last = x;" |
- "}" |
- "return last;})"); |
- // Indexed assignment. |
- TestForIn( |
- "(function(a, b) {" |
- "var array = [0, 1, undefined];" |
- "for (array[2] in a) {" |
- " if (b) { delete a[b]; b = undefined; }" |
- "}" |
- "return array[2];})"); |
- // Named assignment. |
- TestForIn( |
- "(function(a, b) {" |
- "var obj = {'a' : undefined};" |
- "for (obj.a in a) {" |
- " if (b) { delete a[b]; b = undefined; }" |
- "}" |
- "return obj.a;})"); |
-} |
- |
- |
-TEST(ForInContinueStatement) { |
- const char* src = |
- "(function(a,b) {" |
- " var r = '-';" |
- " for (var x in a) {" |
- " r += 'A-';" |
- " if (b) continue;" |
- " r += 'B-';" |
- " }" |
- " return r;" |
- "})"; |
- FunctionTester T(src); |
- |
- T.CheckCall(T.Val("-A-B-"), T.NewObject("({x:1})"), T.false_value()); |
- T.CheckCall(T.Val("-A-B-A-B-"), T.NewObject("({x:1,y:2})"), T.false_value()); |
- T.CheckCall(T.Val("-A-"), T.NewObject("({x:1})"), T.true_value()); |
- T.CheckCall(T.Val("-A-A-"), T.NewObject("({x:1,y:2})"), T.true_value()); |
-} |
- |
- |
TEST(ForOfContinueStatement) { |
const char* src = |
"(function(a,b) {" |