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

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

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/formatter_test.dart ('k') | test/selections/selections.unit » ('j') | 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 >>> start at beginning
3 ‹123›45;
4 <<<
5 ‹123›45;
6 >>> start at end
7 12345;‹›
8 <<<
9 12345;‹›
10 >>> zero length
11 123‹›45;
12 <<<
13 123‹›45;
14 >>> length at end
15 12‹345;›
16 <<<
17 12‹345;›
18 >>> unchanged
19 f‹oo(a, ›b, c);
20 <<<
21 f‹oo(a, ›b, c);
22 >>> includes added whitespace
23 a+f‹irst+se›cond;
24 <<<
25 a + f‹irst + se›cond;
26 >>> inside comment
27 foo( /* ‹ */ bar/*›*/);
28 <<<
29 foo(/* ‹ */ bar /*›*/);
30 >>> in beginning of multi-line string literal
31 """f‹irs›t
32 second""";
33 <<<
34 """f‹irs›t
35 second""";
36 >>> in middle of multi-line string literal
37 """first
38 se‹cond
39 thi›rd
40 fourth""";
41 <<<
42 """first
43 se‹cond
44 thi›rd
45 fourth""";
46 >>> in end of multi-line string literal
47 """first
48 sec‹ond""" ;›
49 <<<
50 """first
51 sec‹ond""";›
52 >>> in string interpolation
53 foo( "$fi‹rst", "$sec›ond" );
54 <<<
55 foo("$fi‹rst", "$sec›ond");
56 >>> in moved comment
57 someMethod(argument /* long com‹ment that wraps */, other /* last com›ment */);
58 <<<
59 someMethod(
60 argument /* long com‹ment that wraps */,
61 other /* last com›ment */);
62 >>> before comments
63 1 ‹ /* */ + › /* */ 2;
64 <<<
65 1 ‹/* */ + ›/* */ 2;
66 >>> after comments
67 1/* */ ‹ +/* */ › 2;
68 <<<
69 1 /* */ ‹+ /* */ ›2;
70 >>> between adjacent comments
71 1/* */ ‹ /* */ › /* */ + 2;
72 <<<
73 1 /* */ ‹/* */ ›/* */ + 2;
OLDNEW
« no previous file with comments | « test/formatter_test.dart ('k') | test/selections/selections.unit » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698