| 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 7a4a0b335b44e9b44c66171ea444cee9c9f3fe41..5a7bdb9b4ae2fb544f89267e4e085acc1fdf2ecc 100644
|
| --- a/test/cctest/compiler/test-run-jsbranches.cc
|
| +++ b/test/cctest/compiler/test-run-jsbranches.cc
|
| @@ -168,6 +168,33 @@ TEST(ForInContinueStatement) {
|
| }
|
|
|
|
|
| +TEST(ForOfContinueStatement) {
|
| + const char* src =
|
| + "(function(a,b) {"
|
| + " var r = '-';"
|
| + " for (var x of a) {"
|
| + " r += x + '-';"
|
| + " if (b) continue;"
|
| + " r += 'X-';"
|
| + " }"
|
| + " return r;"
|
| + "})";
|
| + FunctionTester T(src);
|
| +
|
| + CompileRun(
|
| + "function wrap(v) {"
|
| + " var iterable = {};"
|
| + " function next() { return { done:!v.length, value:v.shift() }; };"
|
| + " iterable[Symbol.iterator] = function() { return { next:next }; };"
|
| + " return iterable;"
|
| + "}");
|
| +
|
| + T.CheckCall(T.Val("-"), T.NewObject("wrap([])"), T.true_value());
|
| + T.CheckCall(T.Val("-1-2-"), T.NewObject("wrap([1,2])"), T.true_value());
|
| + T.CheckCall(T.Val("-1-X-2-X-"), T.NewObject("wrap([1,2])"), T.false_value());
|
| +}
|
| +
|
| +
|
| TEST(SwitchStatement) {
|
| const char* src =
|
| "(function(a,b) {"
|
|
|