Index: test/unittests/compiler/js-typed-lowering-unittest.cc |
diff --git a/test/unittests/compiler/js-typed-lowering-unittest.cc b/test/unittests/compiler/js-typed-lowering-unittest.cc |
index 05ee20adaed0d64a82aa004f324e9b1a0371ecb4..18db34855588a8fe4c8dd47cc8474772758ea07c 100644 |
--- a/test/unittests/compiler/js-typed-lowering-unittest.cc |
+++ b/test/unittests/compiler/js-typed-lowering-unittest.cc |
@@ -26,6 +26,10 @@ const ExternalArrayType kExternalArrayTypes[] = { |
}; |
+Type* const kJSTypes[] = {Type::Undefined(), Type::Null(), Type::Boolean(), |
+ Type::Number(), Type::String(), Type::Object()}; |
+ |
+ |
const StrictMode kStrictModes[] = {SLOPPY, STRICT}; |
} // namespace |
@@ -109,6 +113,25 @@ TEST_F(JSTypedLoweringTest, JSToBooleanWithOrderedNumberAndBoolean) { |
// ----------------------------------------------------------------------------- |
+// JSStrictEqual |
+ |
+ |
+TEST_F(JSTypedLoweringTest, JSStrictEqualWithTheHole) { |
+ Node* const the_hole = HeapConstant(factory()->the_hole_value()); |
+ Node* const context = UndefinedConstant(); |
+ Node* const effect = graph()->start(); |
+ Node* const control = graph()->start(); |
+ TRACED_FOREACH(Type*, type, kJSTypes) { |
+ Node* const lhs = Parameter(type); |
+ Reduction r = Reduce(graph()->NewNode(javascript()->StrictEqual(), lhs, |
+ the_hole, context, effect, control)); |
+ ASSERT_TRUE(r.Changed()); |
+ EXPECT_THAT(r.replacement(), IsFalseConstant()); |
+ } |
+} |
+ |
+ |
+// ----------------------------------------------------------------------------- |
// JSShiftLeft |