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

Side by Side Diff: packages/dart_style/test/splitting/maps.stmt

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
(Empty)
1 40 columns |
2 >>> empty map
3 var m = { };
4 <<<
5 var m = {};
6 >>> exactly 40 characters
7 var m = {first: second, third: forth__};
8 <<<
9 var m = {first: second, third: forth__};
10 >>>
11 var m = {first: second, third: fourth, fifth: sixth};
12 <<<
13 var m = {
14 first: second,
15 third: fourth,
16 fifth: sixth
17 };
18 >>> splits outer maps even if they fit
19 var m = {a: {b: c}, d: {},
20 e: {f: {g: h} } };
21 <<<
22 var m = {
23 a: {b: c},
24 d: {},
25 e: {
26 f: {g: h}
27 }
28 };
29 >>> split indirect outer
30 var m = {a: function({b: inner})};
31 <<<
32 var m = {
33 a: function({b: inner})
34 };
35 >>> empty literal does not force outer split
36 var m = {a:{}, b: [], c: () {}};
37 <<<
38 var m = {a: {}, b: [], c: () {}};
39 >>> nested split map
40 var m = {first: 1, second: {third: fourth}, fifth: 5, nested: {sixth: seventh, e ighth: nine,
41 tenth: eleventh}};
42 <<<
43 var m = {
44 first: 1,
45 second: {third: fourth},
46 fifth: 5,
47 nested: {
48 sixth: seventh,
49 eighth: nine,
50 tenth: eleventh
51 }
52 };
53 >>> force multi-line because of contained block
54 var m = {first: 1, fn: () {"fn";},third:fourth};
55 <<<
56 var m = {
57 first: 1,
58 fn: () {
59 "fn";
60 },
61 third: fourth
62 };
63 >>> containing comments
64 var m = {first: one /* bang */, second: two};
65 <<<
66 var m = {
67 first: one /* bang */,
68 second: two
69 };
70 >>> const
71 var map = const {"foo": "bar", "fuz": null};
72 <<<
73 var map = const {
74 "foo": "bar",
75 "fuz": null
76 };
77 >>> dangling comma
78 var map = {"foo": "bar" , };
79 <<<
80 var map = {"foo": "bar",};
81 >>> dangling comma multiline
82 var map = {"foo": "bar", "fuzzy": null , };
83 <<<
84 var map = {
85 "foo": "bar",
86 "fuzzy": null,
87 };
88 >>> preserve newlines in maps containing a line comment
89 var map = {
90 // yeah
91 a:b,c:d,
92 e:f,g:h
93 };
94 <<<
95 var map = {
96 // yeah
97 a: b, c: d,
98 e: f, g: h
99 };
100 >>> wrap between elements even when newlines are preserved
101 var map = {
102 // yes
103 first: "value", second: "value", third: "value",
104
105 fourth: "value", fifth: "value", sixth: "value", seventh: "value"
106 };
107 <<<
108 var map = {
109 // yes
110 first: "value", second: "value",
111 third: "value",
112
113 fourth: "value", fifth: "value",
114 sixth: "value", seventh: "value"
115 };
116 >>> ignore line comment after the "]"
117 var map = {
118 a:b,c:
119 d
120 } // comment
121 ;
122 <<<
123 var map = {a: b, c: d} // comment
124 ;
125 >>> preserves one blank line between elements
126 var map = {
127
128
129 element: value,
130
131
132
133 // comment
134 element: value,
135
136
137
138 element: value
139
140
141 };
142 <<<
143 var map = {
144 element: value,
145
146 // comment
147 element: value,
148
149 element: value
150 };
151 >>> ignore newlines between keys and values
152 var map = {// comment
153 a:
154 value
155 };
156 <<<
157 var map = {
158 // comment
159 a: value
160 };
OLDNEW
« no previous file with comments | « packages/dart_style/test/splitting/map_arguments.stmt ('k') | packages/dart_style/test/splitting/members.unit » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698