| 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 e25c2533727cf2793abef1e2b014ad112002db9c..24958de3a3a80bcfb3dc1d2f797e2393fa32e4f3 100644
|
| --- a/pkg/analyzer/test/generated/ast_test.dart
|
| +++ b/pkg/analyzer/test/generated/ast_test.dart
|
| @@ -2290,6 +2290,13 @@ class ToSourceVisitorTest extends EngineTestCase {
|
| _assertSource("continue;", AstFactory.continueStatement());
|
| }
|
|
|
| + 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_visitDefaultFormalParameter_named_noValue() {
|
| _assertSource(
|
| "p",
|
| @@ -2318,13 +2325,6 @@ 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);",
|
| @@ -2423,6 +2423,12 @@ class ToSourceVisitorTest extends EngineTestCase {
|
| _assertSource("@deprecated var a;", declaration);
|
| }
|
|
|
| + void test_visitFieldFormalParameter_annotation() {
|
| + FieldFormalParameter parameter = AstFactory.fieldFormalParameter2('f');
|
| + parameter.metadata.add(AstFactory.annotation(AstFactory.identifier3("A")));
|
| + _assertSource('@A this.f', parameter);
|
| + }
|
| +
|
| void test_visitFieldFormalParameter_functionTyped() {
|
| _assertSource(
|
| "A this.a(b)",
|
| @@ -2467,12 +2473,6 @@ 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) {}",
|
| @@ -2907,16 +2907,17 @@ class ToSourceVisitorTest extends EngineTestCase {
|
| _assertSource("@deprecated typedef A F();", declaration);
|
| }
|
|
|
| - void test_visitFunctionTypedFormalParameter_noType() {
|
| - _assertSource("f()", AstFactory.functionTypedFormalParameter(null, "f"));
|
| - }
|
| -
|
| void test_visitFunctionTypedFormalParameter_annotation() {
|
| - FunctionTypedFormalParameter parameter = AstFactory.functionTypedFormalParameter(null, "f");
|
| + FunctionTypedFormalParameter parameter =
|
| + AstFactory.functionTypedFormalParameter(null, "f");
|
| parameter.metadata.add(AstFactory.annotation(AstFactory.identifier3("A")));
|
| _assertSource('@A f()', parameter);
|
| }
|
|
|
| + void test_visitFunctionTypedFormalParameter_noType() {
|
| + _assertSource("f()", AstFactory.functionTypedFormalParameter(null, "f"));
|
| + }
|
| +
|
| void test_visitFunctionTypedFormalParameter_type() {
|
| _assertSource(
|
| "T f()",
|
| @@ -3524,6 +3525,12 @@ class ToSourceVisitorTest extends EngineTestCase {
|
| _assertSource(scriptTag, AstFactory.scriptTag(scriptTag));
|
| }
|
|
|
| + void test_visitSimpleFormalParameter_annotation() {
|
| + SimpleFormalParameter parameter = AstFactory.simpleFormalParameter3('x');
|
| + parameter.metadata.add(AstFactory.annotation(AstFactory.identifier3("A")));
|
| + _assertSource('@A x', parameter);
|
| + }
|
| +
|
| void test_visitSimpleFormalParameter_keyword() {
|
| _assertSource("var a", AstFactory.simpleFormalParameter(Keyword.VAR, "a"));
|
| }
|
| @@ -3540,12 +3547,6 @@ 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"));
|
| }
|
|
|