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 609b443fe1eeea7fa35ab700b7868de8fefb7700..5128a3faba27fc4d1219eed9b02a58c77db8ed65 100644 |
--- a/test/unittests/compiler/js-typed-lowering-unittest.cc |
+++ b/test/unittests/compiler/js-typed-lowering-unittest.cc |
@@ -284,6 +284,15 @@ TEST_F(JSTypedLoweringTest, JSToBooleanWithOrderedNumber) { |
IsBooleanNot(IsNumberEqual(input, IsNumberConstant(0.0)))); |
} |
+TEST_F(JSTypedLoweringTest, JSToBooleanWithNumber) { |
+ Node* input = Parameter(Type::Number(), 0); |
+ Node* context = Parameter(Type::Any(), 1); |
+ Reduction r = Reduce(graph()->NewNode( |
+ javascript()->ToBoolean(ToBooleanHint::kAny), input, context)); |
+ ASSERT_TRUE(r.Changed()); |
+ EXPECT_THAT(r.replacement(), |
+ IsNumberLessThan(IsNumberConstant(0.0), IsNumberAbs(input))); |
+} |
TEST_F(JSTypedLoweringTest, JSToBooleanWithString) { |
Node* input = Parameter(Type::String(), 0); |