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

Unified Diff: packages/dart_style/test/whitespace/cascades.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
« no previous file with comments | « packages/dart_style/test/whitespace/blocks.stmt ('k') | packages/dart_style/test/whitespace/classes.unit » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/dart_style/test/whitespace/cascades.stmt
diff --git a/packages/dart_style/test/whitespace/cascades.stmt b/packages/dart_style/test/whitespace/cascades.stmt
new file mode 100644
index 0000000000000000000000000000000000000000..19afd7ffac5a69957fbba5dc6fa88cb7bb6c368a
--- /dev/null
+++ b/packages/dart_style/test/whitespace/cascades.stmt
@@ -0,0 +1,36 @@
+40 columns |
+>>> single cascades on same line
+"foo"..toString();
+<<<
+"foo"..toString();
+>>> long single cascade forces multi-line
+"foo"..toString(argument, argument, argument);
+<<<
+"foo"
+ ..toString(
+ argument, argument, argument);
+>>> multiple cascades get the same line when the method names are the same
+list
+ ..add("baz")
+ ..add("bar");
+<<<
+list..add("baz")..add("bar");
+>>> cascades indent contained blocks (and force multi-line) multiple cascades get their own line when method names are different
+foo..fooBar()..toString();
+<<<
+foo
+ ..fooBar()
+ ..toString();
+>>> cascaded setters are always multi-line even with the same name
+foo..baz = 3..baz=5;
+<<<
+foo
+ ..baz = 3
+ ..baz = 5;
+>>> cascades indent contained blocks (and force multi-line)
+"foo"..toString(() {body;});
+<<<
+"foo"
+ ..toString(() {
+ body;
+ });
« no previous file with comments | « packages/dart_style/test/whitespace/blocks.stmt ('k') | packages/dart_style/test/whitespace/classes.unit » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698