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

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

Issue 1521693002: Roll Observatory deps (charted -> ^0.3.0) (Closed) Base URL: https://chromium.googlesource.com/external/github.com/dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years 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: packages/analyzer/test/generated/ast_test.dart
diff --git a/packages/analyzer/test/generated/ast_test.dart b/packages/analyzer/test/generated/ast_test.dart
index e7c20255f53cbb876a89c0f773e0f6d578466b12..e25c2533727cf2793abef1e2b014ad112002db9c 100644
--- a/packages/analyzer/test/generated/ast_test.dart
+++ b/packages/analyzer/test/generated/ast_test.dart
@@ -2318,6 +2318,13 @@ class ToSourceVisitorTest extends EngineTestCase {
AstFactory.simpleFormalParameter3("p"), AstFactory.integer(0)));
}
+ void test_visitDefaultFormalParameter_annotation() {
+ DefaultFormalParameter parameter = AstFactory.positionalFormalParameter(
+ AstFactory.simpleFormalParameter3("p"), AstFactory.integer(0));
+ parameter.metadata.add(AstFactory.annotation(AstFactory.identifier3("A")));
+ _assertSource('@A p = 0', parameter);
+ }
+
void test_visitDoStatement() {
_assertSource(
"do {} while (c);",
@@ -2460,6 +2467,12 @@ class ToSourceVisitorTest extends EngineTestCase {
AstFactory.fieldFormalParameter(null, AstFactory.typeName4("A"), "a"));
}
+ void test_visitFieldFormalParameter_annotation() {
+ FieldFormalParameter parameter = AstFactory.fieldFormalParameter2('f');
+ parameter.metadata.add(AstFactory.annotation(AstFactory.identifier3("A")));
+ _assertSource('@A this.f', parameter);
+ }
+
void test_visitForEachStatement_declared() {
_assertSource(
"for (var a in b) {}",
@@ -2898,6 +2911,12 @@ class ToSourceVisitorTest extends EngineTestCase {
_assertSource("f()", AstFactory.functionTypedFormalParameter(null, "f"));
}
+ void test_visitFunctionTypedFormalParameter_annotation() {
+ FunctionTypedFormalParameter parameter = AstFactory.functionTypedFormalParameter(null, "f");
+ parameter.metadata.add(AstFactory.annotation(AstFactory.identifier3("A")));
+ _assertSource('@A f()', parameter);
+ }
+
void test_visitFunctionTypedFormalParameter_type() {
_assertSource(
"T f()",
@@ -3521,6 +3540,12 @@ class ToSourceVisitorTest extends EngineTestCase {
AstFactory.simpleFormalParameter4(AstFactory.typeName4("A"), "a"));
}
+ void test_visitSimpleFormalParameter_annotation() {
+ SimpleFormalParameter parameter = AstFactory.simpleFormalParameter3('x');
+ parameter.metadata.add(AstFactory.annotation(AstFactory.identifier3("A")));
+ _assertSource('@A x', parameter);
+ }
+
void test_visitSimpleIdentifier() {
_assertSource("a", AstFactory.identifier3("a"));
}
« no previous file with comments | « packages/analyzer/test/generated/all_the_rest_test.dart ('k') | packages/analyzer/test/generated/engine_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698