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

Side by Side Diff: dart/tests/language/many_named_arguments_test.dart

Issue 19759008: Change how we emit code for Function.apply. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments. Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « dart/sdk/lib/_internal/lib/js_helper.dart ('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 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 import 'package:expect/expect.dart';
6
7 class Fisk {
8 method({a: 'a',
9 b: 'b',
10 c: 'c',
11 d: 'd',
12 e: 'e',
13 f: 'f',
14 g: 'g',
15 h: 'h',
16 i: 'i',
17 j: 'j',
18 k: 'k',
19 l: 'l',
20 m: 'm',
21 n: 'n',
22 o: 'o',
23 p: 'p',
24 q: 'q',
25 r: 'r',
26 s: 's',
27 t: 't',
28 u: 'u',
29 v: 'v',
30 w: 'w',
31 x: 'x',
32 y: 'y',
33 z: 'z'}) {
34
35 return
36 'a: $a, '
37 'b: $b, '
38 'c: $c, '
39 'd: $d, '
40 'e: $e, '
41 'f: $f, '
42 'g: $g, '
43 'h: $h, '
44 'i: $i, '
45 'j: $j, '
46 'k: $k, '
47 'l: $l, '
48 'm: $m, '
49 'n: $n, '
50 'o: $o, '
51 'p: $p, '
52 'q: $q, '
53 'r: $r, '
54 's: $s, '
55 't: $t, '
56 'u: $u, '
57 'v: $v, '
58 'w: $w, '
59 'x: $x, '
60 'y: $y, '
61 'z: $z';
62 }
63 }
64
65 main() {
66 var method = new Fisk().method;
67 var namedArguments = new Map();
68 namedArguments[const Symbol('a')] = 'a';
69 Expect.stringEquals(
70 EXPECTED_RESULT, Function.apply(method, [], namedArguments));
71 Expect.stringEquals(
72 EXPECTED_RESULT,
73 new Fisk().method(
74 a: 'a',
75 b: 'b',
76 c: 'c',
77 d: 'd',
78 e: 'e',
79 f: 'f',
80 g: 'g',
81 h: 'h',
82 i: 'i',
83 j: 'j',
84 k: 'k',
85 l: 'l',
86 m: 'm',
87 n: 'n',
88 o: 'o',
89 p: 'p',
90 q: 'q',
91 r: 'r',
92 s: 's',
93 t: 't',
94 u: 'u',
95 v: 'v',
96 w: 'w',
97 x: 'x',
98 y: 'y',
99 z: 'z'));
100 }
101
102 const String EXPECTED_RESULT =
103 'a: a, '
104 'b: b, '
105 'c: c, '
106 'd: d, '
107 'e: e, '
108 'f: f, '
109 'g: g, '
110 'h: h, '
111 'i: i, '
112 'j: j, '
113 'k: k, '
114 'l: l, '
115 'm: m, '
116 'n: n, '
117 'o: o, '
118 'p: p, '
119 'q: q, '
120 'r: r, '
121 's: s, '
122 't: t, '
123 'u: u, '
124 'v: v, '
125 'w: w, '
126 'x: x, '
127 'y: y, '
128 'z: z';
OLDNEW
« no previous file with comments | « dart/sdk/lib/_internal/lib/js_helper.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698