Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(487)

Unified Diff: compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java

Issue 11534013: Issue 7282. Report error for deprecated === and !== (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}

Powered by Google App Engine
This is Rietveld 408576698