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

Unified Diff: packages/dart_style/test/whitespace/metadata.unit

Issue 2990843002: Removed fixed dependencies (Closed)
Patch Set: Created 3 years, 5 months 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/dart_style/test/whitespace/metadata.unit
diff --git a/packages/dart_style/test/whitespace/metadata.unit b/packages/dart_style/test/whitespace/metadata.unit
index 292e8c865352b8e8c8c9b610fdd38205f5162c49..3d8abb3f7a536618be7ebf11ee9de0b4075faef1 100644
--- a/packages/dart_style/test/whitespace/metadata.unit
+++ b/packages/dart_style/test/whitespace/metadata.unit
@@ -63,19 +63,18 @@ foo() {
@b
var c;
}
->>> allow inline annotations before functions
-@meta foo() {}
-<<<
+>>> force newline before function
@meta foo() {}
->>> allow newline before functions
+<<<
@meta
-
-
foo() {}
+>>> multiple annotations before function get their own line
+@meta @another foo() {}
<<<
@meta
+@another
foo() {}
->>> allow inline annotations before members
+>>> force newline before member
class X {
@meta var _x;
@meta X.y();
@@ -83,43 +82,36 @@ class X {
@meta int x() => null;
}
<<<
-class X {
- @meta var _x;
- @meta X.y();
- @meta factory X(x) => null;
- @meta int x() => null;
-}
->>> allow newline before members
class X {
@meta
-
var _x;
-
@meta
-
-
-
X.y();
-
@meta
factory X(x) => null;
-
@meta
-
int x() => null;
}
+>>> multiple annotations before members get own line
+class X {
+ @meta @another var _x;
+ @meta @another X.y();
+ @meta @another factory X(x) => null;
+ @meta @another int x() => null;
+}
<<<
class X {
@meta
+ @another
var _x;
-
@meta
+ @another
X.y();
-
@meta
+ @another
factory X(x) => null;
-
@meta
+ @another
int x() => null;
}
>>> collapse newlines between annotations
@@ -145,16 +137,6 @@ class A {}
@a
@b
class A {}
->>> multiple member annotations always get their own line
-class A {
- @a @b void foo() {}
-}
-<<<
-class A {
- @a
- @b
- void foo() {}
-}
>>> parameter annotations are inline
foo(
@@ -227,8 +209,33 @@ named({@foo bar}) {}
positional([@foo bar]) {}
named({@foo bar}) {}
>>> split between metadata and parameter indents
-function(@VeryLongMetadataAnnotation longParameter) {}
+function(@Annotation @VeryLongMetadataAnnotation longParameter) {}
+<<<
+function(
+ @Annotation
+ @VeryLongMetadataAnnotation
+ longParameter) {}
+>>> unsplit with trailing commas
+function(@Annotation longParameter,@Annotation @Other longParameter2,) {}
+<<<
+function(
+ @Annotation longParameter,
+ @Annotation @Other longParameter2,
+) {}
+>>> split with trailing commas
+function(@Annotation longParameter,@Annotation @Other @Third longParameter2,) {}
+<<<
+function(
+ @Annotation longParameter,
+ @Annotation
+ @Other
+ @Third
+ longParameter2,
+) {}
+>>> keep "covariant" with parameter
+function(@Annotation @VeryLongMetadataAnnotation covariant longParameter) {}
<<<
function(
+ @Annotation
@VeryLongMetadataAnnotation
- longParameter) {}
+ covariant longParameter) {}
« no previous file with comments | « packages/dart_style/test/whitespace/functions.unit ('k') | packages/dart_style/test/whitespace/methods.unit » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698