| 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"));
|
| }
|
|
|