Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(923)

Unified Diff: test/cctest/interpreter/test-bytecode-generator.cc

Issue 2242463002: [interpreter] VisitForTest for bytecode generator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: nit Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/cctest/interpreter/test-bytecode-generator.cc
diff --git a/test/cctest/interpreter/test-bytecode-generator.cc b/test/cctest/interpreter/test-bytecode-generator.cc
index f6b055665efb229a8ec57d3d35826f03a784fbe5..d82bad228b05c4ce041ec04129ce6941f54b9457 100644
--- a/test/cctest/interpreter/test-bytecode-generator.cc
+++ b/test/cctest/interpreter/test-bytecode-generator.cc
@@ -705,6 +705,17 @@ TEST(IfConditions) {
" }\n"
"};\n"
"f();\n",
+
+ "function f(a, b) {\n"
+ " if (a == b || a < 0) {\n"
+ " return 1;\n"
+ " } else if (a > 0 && b > 0) {\n"
+ " return 0;\n"
+ " } else {\n"
+ " return -1;\n"
+ " }\n"
+ "};\n"
+ "f(-1, 1);\n",
};
CHECK(CompareTexts(BuildActual(printer, snippets),
@@ -1615,6 +1626,11 @@ TEST(Conditional) {
"return 1 ? 2 : 3;\n",
"return 1 ? 2 ? 3 : 4 : 5;\n",
+
+ "return 0 < 1 ? 2 : 3;\n",
+
+ "var x = 0;\n"
+ "return x ? 2 : 3;\n",
};
CHECK(CompareTexts(BuildActual(printer, snippets),
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/IfConditions.golden ('k') | test/cctest/test-func-name-inference.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698