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/splitting/loops.stmt

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 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/splitting/loops.stmt
diff --git a/packages/dart_style/test/splitting/loops.stmt b/packages/dart_style/test/splitting/loops.stmt
new file mode 100644
index 0000000000000000000000000000000000000000..800e01decb9c897680526ea001074102c8b5cd68
--- /dev/null
+++ b/packages/dart_style/test/splitting/loops.stmt
@@ -0,0 +1,86 @@
+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, fourth = 4) {}
+<<<
+for (foo;
+ bar;
+ first = 1,
+ second = 2,
+ third = 3,
+ fourth = 4) {}
+>>> nest wrapped initializer
+for (very + long + initialization + expression; a; b) {}
+<<<
+for (very +
+ long +
+ initialization +
+ expression;
+ a;
+ b) {}
+>>> split in for-in loop
+for (var identifier in iteratableExpression) {}
+<<<
+for (var identifier
+ in iteratableExpression) {}
+>>> split in while condition
+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 | « packages/dart_style/test/splitting/lists.stmt ('k') | packages/dart_style/test/splitting/map_arguments.stmt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698