Index: test/unittests/compiler/typer-unittest.cc |
diff --git a/test/unittests/compiler/typer-unittest.cc b/test/unittests/compiler/typer-unittest.cc |
index d30cc8e48883e4cd311821af84fb529ffae5e828..dd85b55e8161edb4370f2d83564d0d87e5a6526c 100644 |
--- a/test/unittests/compiler/typer-unittest.cc |
+++ b/test/unittests/compiler/typer-unittest.cc |
@@ -165,6 +165,16 @@ class TyperTest : public TypedGraphTest { |
EXPECT_TRUE(result_type->Is(expected_type)); |
} |
} |
+ // Test extreme cases. |
+ double x1 = +1e-308; |
+ double x2 = -1e-308; |
+ Type* r1 = Type::NewConstant(isolate()->factory()->NewNumber(x1), zone()); |
+ Type* r2 = Type::NewConstant(isolate()->factory()->NewNumber(x2), zone()); |
+ Type* expected_type = TypeBinaryOp(op, r1, r2); |
+ double result_value = opfun(x1, x2); |
+ Type* result_type = Type::NewConstant( |
+ isolate()->factory()->NewNumber(result_value), zone()); |
+ EXPECT_TRUE(result_type->Is(expected_type)); |
} |
template <class BinaryFunction> |