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

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

Issue 1468973004: No functional change. Sort some files in pkg/analyzer. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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/engine.dart ('k') | pkg/analyzer/test/generated/parser_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"));
}
« no previous file with comments | « pkg/analyzer/lib/src/generated/engine.dart ('k') | pkg/analyzer/test/generated/parser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698