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

Side by Side Diff: test/selections/selections.unit

Issue 822273004: Add API to provide a selection range, and return the updated selection after formatting. (Closed) Base URL: https://github.com/dart-lang/dart_style.git@master
Patch Set: Remove redundant argument check. Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « test/selections/selections.stmt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 40 columns |
2 >>> inside script tag
3 #!scr‹ip›t
4 <<<
5 #!scr‹ip›t
6 >>> select entire file
7 ‹main( ) {
8 body( ) ;}›
9 <<<
10 ‹main() {
11 body();
12 }
13
14 >>> trailing comment
15 ma‹in() {}
16 // com›ment
17 <<<
18 ma‹in() {}
19 // com›ment
20 >>> in discarded whitespace
21 foo( ‹ argument){ › }
22 <<<
23 foo(‹argument) {›}
24 >>> in zero split whitespace
25 main(){veryLongMethodCall(‹veryLongArgumentName);
26 veryLongMethodCall(›veryLongArgumentName);
27 }
28 <<<
29 main() {
30 veryLongMethodCall(
31 ‹veryLongArgumentName);
32 veryLongMethodCall(
33 ›veryLongArgumentName);
34 }
35 >>> in soft space split whitespace
36 main() {shortCall(argument, ‹ argument);
37 shortCall(argument, › argument);
38 }
39 <<<
40 main() {
41 shortCall(argument, ‹argument);
42 shortCall(argument, ›argument);
43 }
44 >>> in hard split whitespace
45 foo() {body; ‹ }
46 bar() {body; › }
47 <<<
48 foo() {
49 body;
50 ‹}
51 bar() {
52 body;
53 ›}
54 >>> across lines that get split separately
55 foo() {
56
57
58 fir‹st();
59 }
60
61 bar() {sec›ond();}
62 <<<
63 foo() {
64 fir‹st();
65 }
66
67 bar() {
68 sec›ond();
69 }
OLDNEW
« no previous file with comments | « test/selections/selections.stmt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698