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

Unified Diff: test/splitting/loops.stmt

Issue 824763004: Allow splitting in clauses in C-style for loop. (Closed) Base URL: https://github.com/dart-lang/dart_style.git@master
Patch Set: Created 6 years 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 | « test/regression/100.stmt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/splitting/loops.stmt
diff --git a/test/splitting/loops.stmt b/test/splitting/loops.stmt
new file mode 100644
index 0000000000000000000000000000000000000000..e9351acfaa933e83872d95e4568dbfb6d2f91e1f
--- /dev/null
+++ b/test/splitting/loops.stmt
@@ -0,0 +1,51 @@
+40 columns |
+>>> do not split before first clause
+for (extremelyReallyQuiteVeryLongFirstClause; second; third) {}
+<<<
+for (extremelyReallyQuiteVeryLongFirstClause;
+ second;
+ third) {}
+>>> split after first clause
+for (veryLongFirstClause; veryLongSecondClause; third) {}
+<<<
+for (veryLongFirstClause;
+ veryLongSecondClause;
+ third) {}
+>>> split after second clause
+for (longFirstClause; longSecondClause; third) {}
+<<<
+for (longFirstClause;
+ longSecondClause;
+ third) {}
+>>> unsplit multiple variable declarations
+for (var a = 1, b = 2; 3; 4) {}
+<<<
+for (var a = 1, b = 2; 3; 4) {}
+>>> split multiple variable declarations
+for (var first = initializer, second = initializer; 1; 2) {}
+<<<
+for (var first = initializer,
+ second = initializer;
+ 1;
+ 2) {}
+>>> unsplit updaters
+for (foo; bar; a++, b++) {}
+<<<
+for (foo; bar; a++, b++) {}
+>>> split between updaters splits everything
+for (foo; bar; first = 1, second = 2, third = 3) {}
+<<<
+for (foo;
+ bar;
+ first = 1,
+ second = 2,
+ third = 3) {}
+>>> nest wrapped initializer
+for (very + long + initialization + expression; a; b) {}
+<<<
+for (very +
+ long +
+ initialization +
+ expression;
+ a;
+ b) {}
« no previous file with comments | « test/regression/100.stmt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698