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

Unified Diff: test/splitting/generic_method_arguments.stmt

Issue 2526633002: Support generic methods. Fix #556. (Closed)
Patch Set: Merge branch 'master' into generic-methods Created 4 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 | « pubspec.lock ('k') | test/splitting/type_arguments.stmt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/splitting/generic_method_arguments.stmt
diff --git a/test/splitting/generic_method_arguments.stmt b/test/splitting/generic_method_arguments.stmt
new file mode 100644
index 0000000000000000000000000000000000000000..6abf870898552180384651199a8db2bec2bbdb71
--- /dev/null
+++ b/test/splitting/generic_method_arguments.stmt
@@ -0,0 +1,71 @@
+40 columns |
+>>> all fit on one line
+method<A,B,C,D>();
+<<<
+method<A, B, C, D>();
+>>> prefer to split between args even when they all fit on next line
+lengthyMethodName<First, Second, Third>();
+<<<
+lengthyMethodName<First, Second,
+ Third>();
+>>> split before first if needed
+lengthyMethodName<FirstTypeArgumentIsLong, Second>();
+<<<
+lengthyMethodName<
+ FirstTypeArgumentIsLong, Second>();
+>>> split in middle if fit in two lines
+lengthyMethodName<First, Second, Third, Fourth, Fifth, Sixth, Seventh>();
+<<<
+lengthyMethodName<First, Second, Third,
+ Fourth, Fifth, Sixth, Seventh>();
+>>> split one per line if they don't fit in two lines
+lengthyMethodName<First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth>();
+<<<
+lengthyMethodName<
+ First,
+ Second,
+ Third,
+ Fourth,
+ Fifth,
+ Sixth,
+ Seventh,
+ Eighth>();
+>>> prefers to not split at type arguments
+lengthyMethodName<
+ TypeArgument>(valueArgument);
+<<<
+lengthyMethodName<TypeArgument>(
+ valueArgument);
+>>> split both type and value arguments
+lengthyMethodName<First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth>(first, second, third, fourth, fifth, sixth, seventh, eighth);
+<<<
+lengthyMethodName<
+ First,
+ Second,
+ Third,
+ Fourth,
+ Fifth,
+ Sixth,
+ Seventh,
+ Eighth>(
+ first,
+ second,
+ third,
+ fourth,
+ fifth,
+ sixth,
+ seventh,
+ eighth);
+>>> in method chain
+receiver.method<First, Second, Third, Fourth, Fifth>
+ (first, second, third, fourth, fifth)
+.method<First, Second, Third, Fourth, Fifth>
+ (first, second, third, fourth, fifth);
+<<<
+receiver
+ .method<First, Second, Third,
+ Fourth, Fifth>(first,
+ second, third, fourth, fifth)
+ .method<First, Second, Third,
+ Fourth, Fifth>(first,
+ second, third, fourth, fifth);
« no previous file with comments | « pubspec.lock ('k') | test/splitting/type_arguments.stmt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698