Chromium Code Reviews| Index: compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java |
| diff --git a/compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java b/compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java |
| index 5c270db634d58d291a0b73b9ca83a0058c5d0dac..2d69ad89966cbd1a0778a569281ae3859b5eb6e4 100644 |
| --- a/compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java |
| +++ b/compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java |
| @@ -240,7 +240,7 @@ public class CompileTimeConstantTest extends ResolverTestCase { |
| public void test_expressionsWithNull() { |
| resolveAndTestCtConst(Joiner.on("\n").join( |
| "class Object {}", |
| - "var b = null === '';")); |
| + "var b = null;")); |
|
Brian Wilkerson
2012/12/11 17:28:14
Given that this is no longer testing an expression
|
| } |
| public void test_parameterDefaultValue_inLocalFunction() { |
| @@ -541,8 +541,6 @@ public class CompileTimeConstantTest extends ResolverTestCase { |
| " static const BOP7 = false || BOOL_LIT;", |
| " static const BOP8 = STRING_LIT == 'World!';", |
| " static const BOP9 = 'Hello' != STRING_LIT;", |
| - " static const BOP10 = INT_LIT === INT_LIT_REF;", |
| - " static const BOP11 = BOOL_LIT !== true;", |
| "}")); |
| } |
| @@ -625,32 +623,29 @@ public class CompileTimeConstantTest extends ResolverTestCase { |
| } |
| public void testConstantBinaryExpression9() { |
| - resolveAndTestCtConst(Joiner.on("\n").join( |
| - "class Object {}", |
| - "class bool {}", |
| - "class int {}", |
| - "class double {}", |
| - "class num {}", |
| - "class A {", |
| - " static Object foo() { return true; }", |
| - "}", |
| - "class B {", |
| - " const B();", |
| - " static const OBJECT_LIT = const B();", |
| - " static const INT_LIT = 1;", |
| - " static const STRING_LIT = 'true';", |
| - " static const BOP1 = STRING_LIT && true;", |
| - " static const BOP2 = false || STRING_LIT;", |
| - " static const BOP3 = 59 == OBJECT_LIT;", |
| - " static const BOP4 = OBJECT_LIT != 59;", |
| - " static const BOP5 = INT_LIT === OBJECT_LIT;", |
| - " static const BOP6 = OBJECT_LIT !== true;", |
| - "}"), |
| + resolveAndTestCtConst( |
| + Joiner.on("\n").join( |
| + "class Object {}", |
| + "class bool {}", |
| + "class int {}", |
| + "class double {}", |
| + "class num {}", |
| + "class A {", |
| + " static Object foo() { return true; }", |
| + "}", |
| + "class B {", |
| + " const B();", |
| + " static const OBJECT_LIT = const B();", |
| + " static const INT_LIT = 1;", |
| + " static const STRING_LIT = 'true';", |
| + " static const BOP1 = STRING_LIT && true;", |
| + " static const BOP2 = false || STRING_LIT;", |
| + " static const BOP3 = 59 == OBJECT_LIT;", |
| + " static const BOP4 = OBJECT_LIT != 59;", |
| + "}"), |
| ResolverErrorCode.EXPECTED_CONSTANT_EXPRESSION_BOOLEAN, |
| ResolverErrorCode.EXPECTED_CONSTANT_EXPRESSION_BOOLEAN, |
| ResolverErrorCode.EXPECTED_CONSTANT_EXPRESSION_STRING_NUMBER_BOOL, |
| - ResolverErrorCode.EXPECTED_CONSTANT_EXPRESSION_STRING_NUMBER_BOOL, |
| - ResolverErrorCode.EXPECTED_CONSTANT_EXPRESSION_STRING_NUMBER_BOOL, |
| ResolverErrorCode.EXPECTED_CONSTANT_EXPRESSION_STRING_NUMBER_BOOL); |
| } |