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

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

Issue 2492633002: Create AST structure for asserts in constructor initializers (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/parser_test.dart
diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart
index 91097c6a83e39030a103a7d60dc6462a7222173d..550b85493abf3df49b121f77e4ea8eb0458d4261 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -7846,7 +7846,12 @@ void''');
expect(member, new isInstanceOf<ConstructorDeclaration>());
ConstructorDeclaration constructor = member as ConstructorDeclaration;
NodeList<ConstructorInitializer> initializers = constructor.initializers;
- expect(initializers, hasLength(2));
+ expect(initializers, hasLength(3));
+ ConstructorInitializer initializer = initializers[1];
+ expect(initializer, new isInstanceOf<AssertInitializer>());
+ AssertInitializer assertInitializer = initializer;
+ expect(assertInitializer.condition, isNotNull);
+ expect(assertInitializer.message, isNull);
}
void test_parseConstructor_with_pseudo_function_literal() {
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698