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

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/ast/ClassDeclarationTest.java

Issue 244183002: Add ClassDeclaration/ClassTypeAlias.isAbstract() and use them. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: forgotten class Created 6 years, 8 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: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/ast/ClassDeclarationTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/ast/ClassDeclarationTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/ast/ClassDeclarationTest.java
index 74779433c2254e87817dc03276e695f001970f1f..6f15500d58c2b1f8ebedff9debff0b395f68fdf3 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/ast/ClassDeclarationTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/ast/ClassDeclarationTest.java
@@ -14,6 +14,7 @@
package com.google.dart.engine.ast;
import com.google.dart.engine.parser.ParserTestCase;
+import com.google.dart.engine.scanner.Keyword;
import static com.google.dart.engine.ast.AstFactory.classDeclaration;
import static com.google.dart.engine.ast.AstFactory.constructorDeclaration;
@@ -106,4 +107,9 @@ public class ClassDeclarationTest extends ParserTestCase {
assertSame(bMethod, clazz.getMethod("b"));
assertSame(null, clazz.getMethod("noSuchMethod"));
}
+
+ public void test_isAbstract() throws Exception {
+ assertFalse(classDeclaration(null, "A", null, null, null, null).isAbstract());
+ assertTrue(classDeclaration(Keyword.ABSTRACT, "B", null, null, null, null).isAbstract());
+ }
}

Powered by Google App Engine
This is Rietveld 408576698