Chromium Code Reviews| Index: test/unittests/compiler/machine-operator-reducer-unittest.cc |
| diff --git a/test/unittests/compiler/machine-operator-reducer-unittest.cc b/test/unittests/compiler/machine-operator-reducer-unittest.cc |
| index b81ec2f3c568d41af52fa2a45f811ed851716408..318738eb34303edfd035d99068877f3538ae8c2e 100644 |
| --- a/test/unittests/compiler/machine-operator-reducer-unittest.cc |
| +++ b/test/unittests/compiler/machine-operator-reducer-unittest.cc |
| @@ -1772,6 +1772,21 @@ TEST_F(MachineOperatorReducerTest, Float64Log1pWithConstant) { |
| } |
| // ----------------------------------------------------------------------------- |
| +// Float64Pow |
| + |
| +TEST_F(MachineOperatorReducerTest, Float64PowWithConstant) { |
| + TRACED_FOREACH(double, x, kFloat64Values) { |
| + TRACED_FOREACH(double, y, kFloat64Values) { |
| + Reduction const r = Reduce(graph()->NewNode( |
| + machine()->Float64Pow(), Float64Constant(x), Float64Constant(y))); |
| + ASSERT_TRUE(r.Changed()); |
| + EXPECT_THAT(r.replacement(), |
| + IsFloat64Constant(NanSensitiveDoubleEq(Pow(x, y)))); |
| + } |
| + } |
| +} |
| + |
|
ahaas
2016/09/12 10:45:23
Nit: could you add a test for x ** +-0.0 => 1.0?
Benedikt Meurer
2016/09/12 10:52:03
Done.
|
| +// ----------------------------------------------------------------------------- |
| // Float64Sin |
| TEST_F(MachineOperatorReducerTest, Float64SinWithConstant) { |