| Index: test/unittests/compiler/typer-unittest.cc
|
| diff --git a/test/unittests/compiler/typer-unittest.cc b/test/unittests/compiler/typer-unittest.cc
|
| index f977c6fddd4d26a7d6928cee22ce734e5b9fb67e..4542079a668e76088b0046bd47be5734a6d256cb 100644
|
| --- a/test/unittests/compiler/typer-unittest.cc
|
| +++ b/test/unittests/compiler/typer-unittest.cc
|
| @@ -225,99 +225,95 @@ int32_t bit_xor(int32_t x, int32_t y) { return x ^ y; }
|
|
|
|
|
| TEST_F(TyperTest, TypeJSAdd) {
|
| - TestBinaryArithOp(javascript_.Add(LanguageMode::SLOPPY), std::plus<double>());
|
| - TestBinaryArithOp(javascript_.Add(LanguageMode::STRONG), std::plus<double>());
|
| + TestBinaryArithOp(javascript_.Add(Strength::WEAK), std::plus<double>());
|
| + TestBinaryArithOp(javascript_.Add(Strength::FIRM), std::plus<double>());
|
| }
|
|
|
|
|
| TEST_F(TyperTest, TypeJSSubtract) {
|
| - TestBinaryArithOp(javascript_.Subtract(LanguageMode::SLOPPY),
|
| - std::minus<double>());
|
| - TestBinaryArithOp(javascript_.Subtract(LanguageMode::STRONG),
|
| - std::minus<double>());
|
| + TestBinaryArithOp(javascript_.Subtract(Strength::WEAK), std::minus<double>());
|
| + TestBinaryArithOp(javascript_.Subtract(Strength::FIRM), std::minus<double>());
|
| }
|
|
|
|
|
| TEST_F(TyperTest, TypeJSMultiply) {
|
| - TestBinaryArithOp(javascript_.Multiply(LanguageMode::SLOPPY),
|
| + TestBinaryArithOp(javascript_.Multiply(Strength::WEAK),
|
| std::multiplies<double>());
|
| - TestBinaryArithOp(javascript_.Multiply(LanguageMode::STRONG),
|
| + TestBinaryArithOp(javascript_.Multiply(Strength::FIRM),
|
| std::multiplies<double>());
|
| }
|
|
|
|
|
| TEST_F(TyperTest, TypeJSDivide) {
|
| - TestBinaryArithOp(javascript_.Divide(LanguageMode::SLOPPY),
|
| - std::divides<double>());
|
| - TestBinaryArithOp(javascript_.Divide(LanguageMode::STRONG),
|
| - std::divides<double>());
|
| + TestBinaryArithOp(javascript_.Divide(Strength::WEAK), std::divides<double>());
|
| + TestBinaryArithOp(javascript_.Divide(Strength::FIRM), std::divides<double>());
|
| }
|
|
|
|
|
| TEST_F(TyperTest, TypeJSModulus) {
|
| - TestBinaryArithOp(javascript_.Modulus(LanguageMode::SLOPPY), modulo);
|
| - TestBinaryArithOp(javascript_.Modulus(LanguageMode::STRONG), modulo);
|
| + TestBinaryArithOp(javascript_.Modulus(Strength::WEAK), modulo);
|
| + TestBinaryArithOp(javascript_.Modulus(Strength::FIRM), modulo);
|
| }
|
|
|
|
|
| TEST_F(TyperTest, TypeJSBitwiseOr) {
|
| - TestBinaryBitOp(javascript_.BitwiseOr(LanguageMode::SLOPPY), bit_or);
|
| - TestBinaryBitOp(javascript_.BitwiseOr(LanguageMode::STRONG), bit_or);
|
| + TestBinaryBitOp(javascript_.BitwiseOr(Strength::WEAK), bit_or);
|
| + TestBinaryBitOp(javascript_.BitwiseOr(Strength::FIRM), bit_or);
|
| }
|
|
|
|
|
| TEST_F(TyperTest, TypeJSBitwiseAnd) {
|
| - TestBinaryBitOp(javascript_.BitwiseAnd(LanguageMode::SLOPPY), bit_and);
|
| - TestBinaryBitOp(javascript_.BitwiseAnd(LanguageMode::STRONG), bit_and);
|
| + TestBinaryBitOp(javascript_.BitwiseAnd(Strength::WEAK), bit_and);
|
| + TestBinaryBitOp(javascript_.BitwiseAnd(Strength::FIRM), bit_and);
|
| }
|
|
|
|
|
| TEST_F(TyperTest, TypeJSBitwiseXor) {
|
| - TestBinaryBitOp(javascript_.BitwiseXor(LanguageMode::SLOPPY), bit_xor);
|
| - TestBinaryBitOp(javascript_.BitwiseXor(LanguageMode::STRONG), bit_xor);
|
| + TestBinaryBitOp(javascript_.BitwiseXor(Strength::WEAK), bit_xor);
|
| + TestBinaryBitOp(javascript_.BitwiseXor(Strength::FIRM), bit_xor);
|
| }
|
|
|
|
|
| TEST_F(TyperTest, TypeJSShiftLeft) {
|
| - TestBinaryBitOp(javascript_.ShiftLeft(LanguageMode::SLOPPY), shift_left);
|
| - TestBinaryBitOp(javascript_.ShiftLeft(LanguageMode::STRONG), shift_left);
|
| + TestBinaryBitOp(javascript_.ShiftLeft(Strength::WEAK), shift_left);
|
| + TestBinaryBitOp(javascript_.ShiftLeft(Strength::FIRM), shift_left);
|
| }
|
|
|
|
|
| TEST_F(TyperTest, TypeJSShiftRight) {
|
| - TestBinaryBitOp(javascript_.ShiftRight(LanguageMode::SLOPPY), shift_right);
|
| - TestBinaryBitOp(javascript_.ShiftRight(LanguageMode::STRONG), shift_right);
|
| + TestBinaryBitOp(javascript_.ShiftRight(Strength::WEAK), shift_right);
|
| + TestBinaryBitOp(javascript_.ShiftRight(Strength::FIRM), shift_right);
|
| }
|
|
|
|
|
| TEST_F(TyperTest, TypeJSLessThan) {
|
| - TestBinaryCompareOp(javascript_.LessThan(LanguageMode::SLOPPY),
|
| + TestBinaryCompareOp(javascript_.LessThan(Strength::WEAK),
|
| std::less<double>());
|
| - TestBinaryCompareOp(javascript_.LessThan(LanguageMode::STRONG),
|
| + TestBinaryCompareOp(javascript_.LessThan(Strength::FIRM),
|
| std::less<double>());
|
| }
|
|
|
|
|
| TEST_F(TyperTest, TypeJSLessThanOrEqual) {
|
| - TestBinaryCompareOp(javascript_.LessThanOrEqual(LanguageMode::SLOPPY),
|
| + TestBinaryCompareOp(javascript_.LessThanOrEqual(Strength::WEAK),
|
| std::less_equal<double>());
|
| - TestBinaryCompareOp(javascript_.LessThanOrEqual(LanguageMode::STRONG),
|
| + TestBinaryCompareOp(javascript_.LessThanOrEqual(Strength::FIRM),
|
| std::less_equal<double>());
|
| }
|
|
|
|
|
| TEST_F(TyperTest, TypeJSGreaterThan) {
|
| - TestBinaryCompareOp(javascript_.GreaterThan(LanguageMode::SLOPPY),
|
| + TestBinaryCompareOp(javascript_.GreaterThan(Strength::WEAK),
|
| std::greater<double>());
|
| - TestBinaryCompareOp(javascript_.GreaterThan(LanguageMode::STRONG),
|
| + TestBinaryCompareOp(javascript_.GreaterThan(Strength::FIRM),
|
| std::greater<double>());
|
| }
|
|
|
|
|
| TEST_F(TyperTest, TypeJSGreaterThanOrEqual) {
|
| - TestBinaryCompareOp(javascript_.GreaterThanOrEqual(LanguageMode::SLOPPY),
|
| + TestBinaryCompareOp(javascript_.GreaterThanOrEqual(Strength::WEAK),
|
| std::greater_equal<double>());
|
| - TestBinaryCompareOp(javascript_.GreaterThanOrEqual(LanguageMode::STRONG),
|
| + TestBinaryCompareOp(javascript_.GreaterThanOrEqual(Strength::FIRM),
|
| std::greater_equal<double>());
|
| }
|
|
|
| @@ -382,10 +378,10 @@ JSBINOP_LIST(TEST_FUNC)
|
| #undef TEST_FUNC
|
|
|
|
|
| -#define TEST_FUNC(name) \
|
| - TEST_F(TyperTest, Monotonicity_##name) { \
|
| - TestBinaryMonotonicity(javascript_.name(LanguageMode::SLOPPY)); \
|
| - TestBinaryMonotonicity(javascript_.name(LanguageMode::STRONG)); \
|
| +#define TEST_FUNC(name) \
|
| + TEST_F(TyperTest, Monotonicity_##name) { \
|
| + TestBinaryMonotonicity(javascript_.name(Strength::WEAK)); \
|
| + TestBinaryMonotonicity(javascript_.name(Strength::FIRM)); \
|
| }
|
| JSBINOP_WITH_STRONG_LIST(TEST_FUNC)
|
| #undef TEST_FUNC
|
|
|