| Index: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java
|
| diff --git a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java
|
| index 87dfc73457b9bf5a0200e1ebfd7016847339c1c5..67bd0a8763d56f8a2e149f3625b80073c4177070 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java
|
| @@ -56,16 +56,14 @@ public class TypeAnalyzerTest extends TypeAnalyzerTestCase {
|
| public void testAssert() {
|
| analyze("assert(true);");
|
| analyze("assert(false);");
|
| - analyzeFail("assert('message');",
|
| - TypeErrorCode.TYPE_NOT_ASSIGNMENT_COMPATIBLE);
|
| + analyzeFail("assert('message');", TypeErrorCode.ASSERT_BOOL);
|
| analyze("assert(null);");
|
| - analyzeFail("assert(1);",
|
| - TypeErrorCode.TYPE_NOT_ASSIGNMENT_COMPATIBLE);
|
| + analyzeFail("assert(1);", TypeErrorCode.ASSERT_BOOL);
|
| analyze("assert(foo() {});");
|
| analyze("assert(bool foo() {});");
|
| analyze("assert(Object foo() {});");
|
| - analyzeFail("assert(String foo() {});",
|
| - TypeErrorCode.TYPE_NOT_ASSIGNMENT_COMPATIBLE);
|
| + analyzeFail("assert(String foo() {});", TypeErrorCode.ASSERT_BOOL);
|
| + analyzeFail("assert(bool foo(x) {});", TypeErrorCode.ASSERT_BOOL);
|
| }
|
|
|
| public void testBadInitializers() {
|
| @@ -1351,7 +1349,7 @@ public class TypeAnalyzerTest extends TypeAnalyzerTestCase {
|
| // analyzeFail("{ void f() {} +f(); }", TypeErrorCode.VOID);
|
| analyzeFail("{ void f() {} var x; x == f(); }", TypeErrorCode.VOID);
|
| analyzeFail("{ void f() {} assert(f()); }", TypeErrorCode.VOID);
|
| - analyzeFail("{ void f() {} assert(f); }", TypeErrorCode.VOID);
|
| + analyzeFail("{ void f() {} assert(f); }", TypeErrorCode.ASSERT_BOOL);
|
| analyzeFail("{ void f() {} while (f()); }", TypeErrorCode.VOID);
|
| analyzeFail("{ void f() {}; ({ 'x': f() }); }", TypeErrorCode.VOID);
|
| }
|
|
|