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

Unified Diff: test/splitting/loops.stmt

Issue 1255703002: Don't force for fully split if initializers or updaters do. (Closed) Base URL: https://github.com/dart-lang/dart_style.git@master
Patch Set: Created 5 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
« no previous file with comments | « test/regression/0300/0377.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
index f9c520ace23cbad4005a1d29e6a5019844f0c7d9..800e01decb9c897680526ea001074102c8b5cd68 100644
--- a/test/splitting/loops.stmt
+++ b/test/splitting/loops.stmt
@@ -33,13 +33,14 @@ 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, fourth = 4) {}
<<<
for (foo;
bar;
first = 1,
second = 2,
- third = 3) {}
+ third = 3,
+ fourth = 4) {}
>>> nest wrapped initializer
for (very + long + initialization + expression; a; b) {}
<<<
@@ -62,4 +63,24 @@ while (aLongConditionExpressionThatWraps) {
while (
aLongConditionExpressionThatWraps) {
;
+}
+>>> don't force variables to split if clauses do
+for (var a = 1, b = 2; longCondition(expression); a += b) {
+ ;
+}
+<<<
+for (var a = 1, b = 2;
+ longCondition(expression);
+ a += b) {
+ ;
+}
+>>> don't force updates to split if clauses do
+for (var a = 0; longCondition(expression); a += 1, b += 1) {
+ ;
+}
+<<<
+for (var a = 0;
+ longCondition(expression);
+ a += 1, b += 1) {
+ ;
}
« no previous file with comments | « test/regression/0300/0377.stmt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698