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

Unified Diff: packages/dart_style/test/whitespace/if.stmt

Issue 1521693002: Roll Observatory deps (charted -> ^0.3.0) (Closed) Base URL: https://chromium.googlesource.com/external/github.com/dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 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 | « packages/dart_style/test/whitespace/._while.stmt ('k') | packages/dart_style/test/whitespace/metadata.unit » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/dart_style/test/whitespace/if.stmt
diff --git a/packages/dart_style/test/whitespace/if.stmt b/packages/dart_style/test/whitespace/if.stmt
index 0403400b9666d9cad53bb4ada179500c68cdd3b9..56019a6584ccd4f7af817a847959e28c95a623cb 100644
--- a/packages/dart_style/test/whitespace/if.stmt
+++ b/packages/dart_style/test/whitespace/if.stmt
@@ -44,8 +44,10 @@ if (true) {
>>> single-expression else body
if(true)print(1);else print(0);
<<<
-if (true) print(1);
-else print(0);
+if (true)
+ print(1);
+else
+ print(0);
>>> chained else if
if (0 == 0) {
zero = 0;
@@ -61,4 +63,29 @@ if (0 == 0) {
zero = 1;
} else if (0 == 2) {
zero = 2;
-}
+}
+>>> long if without curlies
+if (condition) someLong(argument, another);
+<<<
+if (condition)
+ someLong(argument, another);
+>>> long if else without curlies
+if (condition)
+ someLong(argument, another);
+else
+ anotherLong(argument, another);
+<<<
+if (condition)
+ someLong(argument, another);
+else
+ anotherLong(argument, another);
+>>> long if long else without curlies
+if (condition)
+ someLong(argument, another);
+else
+ anotherLong(argument, another, arg);
+<<<
+if (condition)
+ someLong(argument, another);
+else
+ anotherLong(argument, another, arg);
« no previous file with comments | « packages/dart_style/test/whitespace/._while.stmt ('k') | packages/dart_style/test/whitespace/metadata.unit » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698