Index: test/unittests/compiler/simplified-operator-reducer-unittest.cc |
diff --git a/test/unittests/compiler/simplified-operator-reducer-unittest.cc b/test/unittests/compiler/simplified-operator-reducer-unittest.cc |
index f4d8bac70449ea6c1a7deb8e83f74d7d78c62fdf..f84b9bf825ae532451b2d9a661fef03e232dcfeb 100644 |
--- a/test/unittests/compiler/simplified-operator-reducer-unittest.cc |
+++ b/test/unittests/compiler/simplified-operator-reducer-unittest.cc |
@@ -399,6 +399,18 @@ TEST_F(SimplifiedOperatorReducerTest, CheckTaggedSignedWithNumberConstant) { |
} |
// ----------------------------------------------------------------------------- |
+// NumberAbs |
+ |
+TEST_F(SimplifiedOperatorReducerTest, NumberAbsWithNumberConstant) { |
+ TRACED_FOREACH(double, n, kFloat64Values) { |
+ Reduction reduction = |
+ Reduce(graph()->NewNode(simplified()->NumberAbs(), NumberConstant(n))); |
+ ASSERT_TRUE(reduction.Changed()); |
+ EXPECT_THAT(reduction.replacement(), IsNumberConstant(std::fabs(n))); |
+ } |
+} |
+ |
+// ----------------------------------------------------------------------------- |
// ObjectIsSmi |
TEST_F(SimplifiedOperatorReducerTest, ObjectIsSmiWithChangeBitToTagged) { |