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

Unified Diff: pkg/analyzer/test/generated/ast_test.dart

Issue 247053004: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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: pkg/analyzer/test/generated/ast_test.dart
diff --git a/pkg/analyzer/test/generated/ast_test.dart b/pkg/analyzer/test/generated/ast_test.dart
index a01561c51089147232a9674217d1bae1fdcbf41c..0c52fe7be7bc7b464d61da86dcdc4b0784b29e3c 100644
--- a/pkg/analyzer/test/generated/ast_test.dart
+++ b/pkg/analyzer/test/generated/ast_test.dart
@@ -260,6 +260,11 @@ class ClassDeclarationTest extends ParserTestCase {
JUnitTestCase.assertSame(null, clazz.getMethod("noSuchMethod"));
}
+ void test_isAbstract() {
+ JUnitTestCase.assertFalse(AstFactory.classDeclaration(null, "A", null, null, null, null, []).isAbstract);
+ JUnitTestCase.assertTrue(AstFactory.classDeclaration(Keyword.ABSTRACT, "B", null, null, null, null, []).isAbstract);
+ }
+
static dartSuite() {
_ut.group('ClassDeclarationTest', () {
_ut.test('test_getConstructor', () {
@@ -274,6 +279,10 @@ class ClassDeclarationTest extends ParserTestCase {
final __test = new ClassDeclarationTest();
runJUnitTest(__test, __test.test_getMethod);
});
+ _ut.test('test_isAbstract', () {
+ final __test = new ClassDeclarationTest();
+ runJUnitTest(__test, __test.test_isAbstract);
+ });
});
}
}
@@ -1417,6 +1426,22 @@ class NodeListTest extends EngineTestCase {
}
}
+class ClassTypeAliasTest extends ParserTestCase {
+ void test_isAbstract() {
+ JUnitTestCase.assertFalse(AstFactory.classTypeAlias("A", null, null, null, null, null).isAbstract);
+ JUnitTestCase.assertTrue(AstFactory.classTypeAlias("B", null, Keyword.ABSTRACT, null, null, null).isAbstract);
+ }
+
+ static dartSuite() {
+ _ut.group('ClassTypeAliasTest', () {
+ _ut.test('test_isAbstract', () {
+ final __test = new ClassTypeAliasTest();
+ runJUnitTest(__test, __test.test_isAbstract);
+ });
+ });
+ }
+}
+
class ConstantEvaluatorTest extends ParserTestCase {
void fail_constructor() {
Object value = _getConstantValue("?");
@@ -4248,6 +4273,7 @@ main() {
ToSourceVisitorTest.dartSuite();
BreadthFirstVisitorTest.dartSuite();
ClassDeclarationTest.dartSuite();
+ ClassTypeAliasTest.dartSuite();
IndexExpressionTest.dartSuite();
NodeListTest.dartSuite();
SimpleIdentifierTest.dartSuite();

Powered by Google App Engine
This is Rietveld 408576698