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); |