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

Unified Diff: test/splitting/mixed.stmt

Issue 1504553002: Better handling for binary operators in => bodies. (Closed) Base URL: https://github.com/dart-lang/dart_style.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 | « test/regression/0400/0434.unit ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/splitting/mixed.stmt
diff --git a/test/splitting/mixed.stmt b/test/splitting/mixed.stmt
index 5e641cbedebc5dc96979e1fd2135526204480129..33cdba44bf5f5023add63a19a9ba8f422f48079c 100644
--- a/test/splitting/mixed.stmt
+++ b/test/splitting/mixed.stmt
@@ -95,14 +95,15 @@ function(
receiver.firstMethod().next((parameter) => longIdentifier == veryLongIdentifier);
<<<
receiver.firstMethod().next(
- (parameter) => longIdentifier ==
+ (parameter) =>
+ longIdentifier ==
veryLongIdentifier);
>>> wrap after =>
receiver.firstMethod().next(() => veryveryveryverylongIdentifier == veryLongIdentifier);
<<<
receiver.firstMethod().next(() =>
veryveryveryverylongIdentifier ==
- veryLongIdentifier);
+ veryLongIdentifier);
>>> wrap at nested binary operator
receiver.firstMethod().next(longIdentifier == veryLongIdentifier);
<<<
@@ -197,4 +198,16 @@ longIdentifier +
<<<
longIdentifier +
(longIdentifier ? 0 : 1) ==
- identifier;
+ identifier;
+>>> normal indent before unsplit binary operators in => body
+veryLongFunction() => extremelyLongArgument + argument;
+<<<
+veryLongFunction() =>
+ extremelyLongArgument + argument;
+>>> no extra indent before binary operators in => body
+veryLongFunction() => longArgument + longArgument + longArgument;
+<<<
+veryLongFunction() =>
+ longArgument +
+ longArgument +
+ longArgument;
« no previous file with comments | « test/regression/0400/0434.unit ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698