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

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

Issue 2554723004: [Interpreter] Transform StrictEquality with null/undefined to special bytecodes. (Closed)
Patch Set: rebased the patch. Created 4 years 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 4ff9e5352a95df32fb16a09a151bec0d90da9d0d..3f3f5821dfa9146e8d23fbab68950324b55d6329 100644
--- a/test/cctest/interpreter/test-bytecode-generator.cc
+++ b/test/cctest/interpreter/test-bytecode-generator.cc
@@ -1750,17 +1750,40 @@ TEST(GenerateTestUndetectable) {
"var b = 10;\n"
"if (obj_a == null) { b = 20;}\n"
"return b;\n",
+
"var obj_a = {val:1};\n"
"var b = 10;\n"
"if (obj_a == undefined) { b = 20;}\n"
"return b;\n",
+
"var obj_a = {val:1};\n"
"var b = 10;\n"
"if (obj_a != null) { b = 20;}\n"
"return b;\n",
+
"var obj_a = {val:1};\n"
"var b = 10;\n"
"if (obj_a != undefined) { b = 20;}\n"
+ "return b;\n",
+
+ "var obj_a = {val:1};\n"
+ "var b = 10;\n"
+ "if (obj_a === null) { b = 20;}\n"
+ "return b;\n",
+
+ "var obj_a = {val:1};\n"
+ "var b = 10;\n"
+ "if (obj_a === undefined) { b = 20;}\n"
+ "return b;\n",
+
+ "var obj_a = {val:1};\n"
+ "var b = 10;\n"
+ "if (obj_a !== null) { b = 20;}\n"
+ "return b;\n",
+
+ "var obj_a = {val:1};\n"
+ "var b = 10;\n"
+ "if (obj_a !== undefined) { b = 20;}\n"
"return b;\n"};
CHECK(CompareTexts(BuildActual(printer, snippets),

Powered by Google App Engine
This is Rietveld 408576698