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

Side by Side Diff: packages/dart_style/test/splitting/function_arguments.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 >>> args before and after function do not force nesting
3 method(first,() {fn;},third);
4 <<<
5 method(first, () {
6 fn;
7 }, third);
8 >>> nothing but function args does not nest
9 longFunctionName(() {;}, () {;}, () {;});
10 <<<
11 longFunctionName(() {
12 ;
13 }, () {
14 ;
15 }, () {
16 ;
17 });
18 >>> trailing functions do not nest
19 longFunctionName(argument, argument, argument, argument, () {;}, () {;});
20 <<<
21 longFunctionName(argument, argument,
22 argument, argument, () {
23 ;
24 }, () {
25 ;
26 });
27 >>> leading functions do not nest
28 longFunctionName(() {;}, () {;}, argument, argument, argument, argument);
29 <<<
30 longFunctionName(() {
31 ;
32 }, () {
33 ;
34 }, argument, argument, argument,
35 argument);
36 >>> arg between functions forces nesting
37 longFunctionName(() {;}, argument, () {;});
38 <<<
39 longFunctionName(
40 () {
41 ;
42 },
43 argument,
44 () {
45 ;
46 });
47 >>> unsplit leading args
48 longFunctionName(arg, arg, () {;}, () {;});
49 <<<
50 longFunctionName(arg, arg, () {
51 ;
52 }, () {
53 ;
54 });
55 >>> split before leading args
56 longFunctionName(argument, argument, argument, () {;}, () {;});
57 <<<
58 longFunctionName(
59 argument, argument, argument, () {
60 ;
61 }, () {
62 ;
63 });
64 >>> split in middle of leading args
65 longFunctionName(argument, argument, argument, argument, () {;}, () {;});
66 <<<
67 longFunctionName(argument, argument,
68 argument, argument, () {
69 ;
70 }, () {
71 ;
72 });
73 >>> split before all leading args
74 longFunctionName(argument, argument, argument, argument, argument, argument,
75 () {;}, () {;});
76 <<<
77 longFunctionName(
78 argument,
79 argument,
80 argument,
81 argument,
82 argument,
83 argument, () {
84 ;
85 }, () {
86 ;
87 });
88 >>> unsplit trailing args
89 longFunctionName(() {;}, () {;}, argument, argument);
90 <<<
91 longFunctionName(() {
92 ;
93 }, () {
94 ;
95 }, argument, argument);
96 >>> split before trailing args
97 longFunctionName(() {;}, () {;} /* very very long comment */, argument, argument );
98 <<<
99 longFunctionName(() {
100 ;
101 }, () {
102 ;
103 } /* very very long comment */,
104 argument, argument);
105 >>> split in middle of trailing args
106 longFunctionName(() {;}, () {;}, argument, argument, argument, argument);
107 <<<
108 longFunctionName(() {
109 ;
110 }, () {
111 ;
112 }, argument, argument, argument,
113 argument);
114 >>> split before all trailing args
115 longFunctionName(() {;}, () {;}, argument, argument, argument, argument,
116 argument, argument, argument);
117 <<<
118 longFunctionName(() {
119 ;
120 }, () {
121 ;
122 },
123 argument,
124 argument,
125 argument,
126 argument,
127 argument,
128 argument,
129 argument);
130 >>> functions with named arguments
131 longFunctionName(() {;}, a: () {;}, b: () {;});
132 <<<
133 longFunctionName(() {
134 ;
135 }, a: () {
136 ;
137 }, b: () {
138 ;
139 });
140 >>> do not nest because of nested 1-arg fn
141 outer(inner(() {body;}));
142 <<<
143 outer(inner(() {
144 body;
145 }));
146 >>> do not nest because of nested many-arg fn
147 outer(argument, inner(() {body;}));
148 <<<
149 outer(argument, inner(() {
150 body;
151 }));
152 >>> do not nest because of nested 1-arg method call
153 obj.outer(a.b.c.fn(() {body;}));
154 <<<
155 obj.outer(a.b.c.fn(() {
156 body;
157 }));
158 >>> do not nest because of nested many-arg method call
159 obj.outer(argument, a.b.c.fn(() {body;}));
160 <<<
161 obj.outer(argument, a.b.c.fn(() {
162 body;
163 }));
164 >>> do not force named args to split on positional function
165 function(argument, () {;},
166 named: argument, another: argument);
167 <<<
168 function(argument, () {
169 ;
170 }, named: argument, another: argument);
171 >>> args before and after functions split independently
172 longFunction(argument, argument, argument, argument, argument,
173 () {;}, () {;}, argument, argument, argument, argument, argument);
174 <<<
175 longFunction(argument, argument,
176 argument, argument, argument, () {
177 ;
178 }, () {
179 ;
180 }, argument, argument, argument,
181 argument, argument);
OLDNEW
« no previous file with comments | « packages/dart_style/test/splitting/expressions.stmt ('k') | packages/dart_style/test/splitting/imports.unit » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698