Index: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/constant/ConstantVisitorTest.java |
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/constant/ConstantVisitorTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/constant/ConstantVisitorTest.java |
index 14e511e6f0b5efd973cadbfc19d8e8c4138eda6a..8aeab4456fda789127b5586c5af81db4037ec64e 100644 |
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/constant/ConstantVisitorTest.java |
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/constant/ConstantVisitorTest.java |
@@ -141,7 +141,7 @@ public class ConstantVisitorTest extends ResolverTestCase { |
" const factory A() = A.b;", |
" const factory A.b() = A;", |
"}")); |
- assertError(evaluateConstant(compilationUnit, "foo")); |
+ assertValidUnknown(evaluateConstant(compilationUnit, "foo")); |
} |
public void test_visitInstanceCreationExpression_redirect_extern() throws Exception { |
@@ -150,7 +150,7 @@ public class ConstantVisitorTest extends ResolverTestCase { |
"class A {", |
" external const factory A();", |
"}")); |
- assertError(evaluateConstant(compilationUnit, "foo")); |
+ assertValidUnknown(evaluateConstant(compilationUnit, "foo")); |
} |
public void test_visitInstanceCreationExpression_redirect_nonConst() throws Exception { |
@@ -163,7 +163,7 @@ public class ConstantVisitorTest extends ResolverTestCase { |
" const factory A() = A.b;", |
" A.b();", |
"}")); |
- assertError(evaluateConstant(compilationUnit, "foo")); |
+ assertValidUnknown(evaluateConstant(compilationUnit, "foo")); |
} |
public void test_visitInstanceCreationExpression_symbol() throws Exception { |
@@ -175,16 +175,18 @@ public class ConstantVisitorTest extends ResolverTestCase { |
assertEquals("a", value.getValue()); |
} |
- private void assertError(EvaluationResultImpl result) { |
- assertInstanceOf(ErrorResult.class, result); |
- } |
- |
private void assertType(EvaluationResultImpl result, String typeName) { |
assertInstanceOf(ValidResult.class, result); |
DartObjectImpl value = ((ValidResult) result).getValue(); |
assertEquals(typeName, value.getType().getName()); |
} |
+ private void assertValidUnknown(EvaluationResultImpl result) { |
+ assertInstanceOf(ValidResult.class, result); |
+ DartObjectImpl value = ((ValidResult) result).getValue(); |
+ assertTrue(value.isUnknown()); |
+ } |
+ |
private void assertValue(long expectedValue, EvaluationResultImpl result) { |
assertInstanceOf(ValidResult.class, result); |
DartObjectImpl value = ((ValidResult) result).getValue(); |