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

Unified Diff: test/comments/generic_methods.unit

Issue 1583203003: Don't put spaces around magic generic method annotation comments. (Closed) Base URL: https://github.com/dart-lang/dart_style.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « lib/src/chunk_builder.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/comments/generic_methods.unit
diff --git a/test/comments/generic_methods.unit b/test/comments/generic_methods.unit
new file mode 100644
index 0000000000000000000000000000000000000000..d9d28fa796995900975f4829d76e9af4e91e8c73
--- /dev/null
+++ b/test/comments/generic_methods.unit
@@ -0,0 +1,53 @@
+40 columns |
+>>> function declaration
+int f/*<S, T>*/(int x) => 3;
+<<<
+int f/*<S, T>*/(int x) => 3;
+>>> type bounds
+int f/*<S extends Set<S>>*/(int x) => 3;
+<<<
+int f/*<S extends Set<S>>*/(int x) => 3;
+>>> method
+class C {
+ static int f/*<S, T>*/(int x) => 3;
+ int m/*<S, T>*/(int x) => 3;
+}
+<<<
+class C {
+ static int f/*<S, T>*/(int x) => 3;
+ int m/*<S, T>*/(int x) => 3;
+}
+>>> function type parameter
+void foo(int f/*<S>*/(int x)) {}
+<<<
+void foo(int f/*<S>*/(int x)) {}
+>>> variable
+var x = /*<S>*/(int x) => x;
+<<<
+var x = /*<S>*/(int x) => x;
+>>> parameter type
+foo/*<S>*/(dynamic/*=S*/ x) => x;
+<<<
+foo/*<S>*/(dynamic/*=S*/ x) => x;
+>>> return type
+dynamic/*=S*/ foo/*<S>*/() => x;
+<<<
+dynamic/*=S*/ foo/*<S>*/() => x;
+>>> without dynamic
+main() {
+ /*=S*/ foo/*<S>*/(/*=S*/ x) {return x;}
+}
+<<<
+main() {
+ /*=S*/ foo/*<S>*/(/*=S*/ x) {
+ return x;
+ }
+}
+>>> var
+void foo/*<S>*/(var /*=S*/ x) {
+ var /*=S*/ y = x;
+}
+<<<
+void foo/*<S>*/(var/*=S*/ x) {
+ var/*=S*/ y = x;
+}
« no previous file with comments | « lib/src/chunk_builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698