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

Unified Diff: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java

Issue 10516006: Issue 3268. Support for replacing 'assert' statement with 'assert' function (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Changes for review comments Created 8 years, 6 months 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/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 3922b7a655dac348ce427d94d9e1b750400ca923..36e7d956f85099d9775ba34cb4fc986f8f1b0bf5 100644
--- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java
+++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java
@@ -53,19 +53,6 @@ public class TypeAnalyzerTest extends TypeAnalyzerTestCase {
TypeErrorCode.TYPE_NOT_ASSIGNMENT_COMPATIBLE);
}
- public void testAssert() {
- analyze("assert(true);");
- analyze("assert(false);");
- analyzeFail("assert('message');", TypeErrorCode.ASSERT_BOOL);
- analyze("assert(null);");
- analyzeFail("assert(1);", TypeErrorCode.ASSERT_BOOL);
- analyze("assert(foo() {});");
- analyze("assert(bool foo() {});");
- analyze("assert(Object foo() {});");
- analyzeFail("assert(String foo() {});", TypeErrorCode.ASSERT_BOOL);
- analyzeFail("assert(bool foo(x) {});", TypeErrorCode.ASSERT_BOOL);
- }
-
public void testBadInitializers() {
analyzeFail("int i = .0;", TypeErrorCode.TYPE_NOT_ASSIGNMENT_COMPATIBLE);
analyzeFail("int j = 1.0;", TypeErrorCode.TYPE_NOT_ASSIGNMENT_COMPATIBLE);
@@ -1348,8 +1335,6 @@ public class TypeAnalyzerTest extends TypeAnalyzerTestCase {
// We seem to throw away prefix-plus in the parser:
// 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.ASSERT_BOOL);
analyzeFail("{ void f() {} while (f()); }", TypeErrorCode.VOID);
analyzeFail("{ void f() {}; ({ 'x': f() }); }", TypeErrorCode.VOID);
}

Powered by Google App Engine
This is Rietveld 408576698