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

Side by Side Diff: packages/dart_style/test/whitespace/functions.unit

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 >>> external
3 external
4 void
5 printToConsole(line);
6 <<<
7 external void printToConsole(line);
8 >>> nested functions
9 x(){y(){z(){}}}
10 <<<
11 x() {
12 y() {
13 z() {}
14 }
15 }
16 >>> named parameters
17 int a(var x, {optional: null}) => null;
18 <<<
19 int a(var x, {optional: null}) => null;
20 >>> optional parameters
21 int a(var x, [optional = null]) => null;
22 <<<
23 int a(var x, [optional = null]) => null;
24 >>> async
25 main()
26 async {
27 var x = () async=> 1;
28 y()async {}
29 var z = ()
30 async
31 {};
32 }
33 <<<
34 main() async {
35 var x = () async => 1;
36 y() async {}
37 var z = () async {};
38 }
39 >>>
40 fish() => []
41 ..add(1)
42 ..add(2);
43 <<<
44 fish() => []..add(1)..add(2);
45 >>>
46 fish() => []..add(1);
47 <<<
48 fish() => []..add(1);
49 >>> empty function bodies are a single line
50 void main() { }
51 <<<
52 void main() {}
53 >>>
54 void main() {
55
56 }
57 <<<
58 void main() {}
59 >>> DO use a space after : in named parameters
60 foo({showScrollbars :false}) {}
61 <<<
62 foo({showScrollbars: false}) {}
63 >>> DO use a spaces around = in optional positional parameters.
64 listen([int port=80]) {}
65 <<<
66 listen([int port = 80]) {}
67 >>> async*
68 main()async *{var lambda = ()async *{};}
69 <<<
70 main() async* {
71 var lambda = () async* {};
72 }
73 >>> sync* functions
74 main()sync *{var lambda = ()sync *{};}
75 <<<
76 main() sync* {
77 var lambda = () sync* {};
78 }
OLDNEW
« no previous file with comments | « packages/dart_style/test/whitespace/for.stmt ('k') | packages/dart_style/test/whitespace/if.stmt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698