OLD | NEW |
1 dart_library.library('corelib/apply2_test', null, /* Imports */[ | 1 dart_library.library('corelib/apply2_test', null, /* Imports */[ |
2 'dart_sdk', | 2 'dart_sdk', |
3 'expect' | 3 'expect' |
4 ], function load__apply2_test(exports, dart_sdk, expect) { | 4 ], function load__apply2_test(exports, dart_sdk, expect) { |
5 'use strict'; | 5 'use strict'; |
6 const core = dart_sdk.core; | 6 const core = dart_sdk.core; |
7 const _interceptors = dart_sdk._interceptors; | 7 const _interceptors = dart_sdk._interceptors; |
8 const dart = dart_sdk.dart; | 8 const dart = dart_sdk.dart; |
9 const dartx = dart_sdk.dartx; | 9 const dartx = dart_sdk.dartx; |
10 const expect$ = expect.expect; | 10 const expect$ = expect.expect; |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 let a = opts && 'a' in opts ? opts.a : 2; | 97 let a = opts && 'a' in opts ? opts.a : 2; |
98 return dart.str`c7 ${x} ${a} ${b}`; | 98 return dart.str`c7 ${x} ${a} ${b}`; |
99 }, dynamic__ToString()); | 99 }, dynamic__ToString()); |
100 let c8 = dart.fn((x, y, a, b) => { | 100 let c8 = dart.fn((x, y, a, b) => { |
101 if (a === void 0) a = 2; | 101 if (a === void 0) a = 2; |
102 if (b === void 0) b = 3; | 102 if (b === void 0) b = 3; |
103 return dart.str`c8 ${x} ${y} ${a} ${b}`; | 103 return dart.str`c8 ${x} ${y} ${a} ${b}`; |
104 }, dynamicAnddynamic__ToString()); | 104 }, dynamicAnddynamic__ToString()); |
105 expect$.Expect.equals('c1', apply2_test.apply(c1, null, null)); | 105 expect$.Expect.equals('c1', apply2_test.apply(c1, null, null)); |
106 expect$.Expect.equals('c1', apply2_test.apply(c1, [], null)); | 106 expect$.Expect.equals('c1', apply2_test.apply(c1, [], null)); |
107 expect$.Expect.equals('c1', apply2_test.apply(c1, [], dart.map())); | 107 expect$.Expect.equals('c1', apply2_test.apply(c1, [], dart.map({}, core.Symb
ol, dart.dynamic))); |
108 expect$.Expect.equals('c1', apply2_test.apply(c1, null, dart.map())); | 108 expect$.Expect.equals('c1', apply2_test.apply(c1, null, dart.map({}, core.Sy
mbol, dart.dynamic))); |
109 apply2_test.throwsNSME(c1, JSArrayOfint().of([1]), null); | 109 apply2_test.throwsNSME(c1, JSArrayOfint().of([1]), null); |
110 apply2_test.throwsNSME(c1, JSArrayOfint().of([1]), dart.map([const$ || (cons
t$ = dart.const(core.Symbol.new('a'))), 2])); | 110 apply2_test.throwsNSME(c1, JSArrayOfint().of([1]), dart.map([const$ || (cons
t$ = dart.const(core.Symbol.new('a'))), 2], core.Symbol, core.int)); |
111 apply2_test.throwsNSME(c1, null, dart.map([const$0 || (const$0 = dart.const(
core.Symbol.new('a'))), 2])); | 111 apply2_test.throwsNSME(c1, null, dart.map([const$0 || (const$0 = dart.const(
core.Symbol.new('a'))), 2], core.Symbol, core.int)); |
112 expect$.Expect.equals('c2 1', apply2_test.apply(c2, JSArrayOfint().of([1]),
null)); | 112 expect$.Expect.equals('c2 1', apply2_test.apply(c2, JSArrayOfint().of([1]),
null)); |
113 expect$.Expect.equals('c2 1', apply2_test.apply(c2, JSArrayOfint().of([1]),
dart.map())); | 113 expect$.Expect.equals('c2 1', apply2_test.apply(c2, JSArrayOfint().of([1]),
dart.map({}, core.Symbol, dart.dynamic))); |
114 apply2_test.throwsNSME(c2, null, null); | 114 apply2_test.throwsNSME(c2, null, null); |
115 apply2_test.throwsNSME(c2, [], null); | 115 apply2_test.throwsNSME(c2, [], null); |
116 apply2_test.throwsNSME(c2, null, dart.map()); | 116 apply2_test.throwsNSME(c2, null, dart.map()); |
117 apply2_test.throwsNSME(c2, null, dart.map([const$1 || (const$1 = dart.const(
core.Symbol.new('a'))), 1])); | 117 apply2_test.throwsNSME(c2, null, dart.map([const$1 || (const$1 = dart.const(
core.Symbol.new('a'))), 1], core.Symbol, core.int)); |
118 apply2_test.throwsNSME(c2, JSArrayOfint().of([2]), dart.map([const$2 || (con
st$2 = dart.const(core.Symbol.new('a'))), 1])); | 118 apply2_test.throwsNSME(c2, JSArrayOfint().of([2]), dart.map([const$2 || (con
st$2 = dart.const(core.Symbol.new('a'))), 1], core.Symbol, core.int)); |
119 expect$.Expect.equals('c3 1', apply2_test.apply(c3, null, null)); | 119 expect$.Expect.equals('c3 1', apply2_test.apply(c3, null, null)); |
120 expect$.Expect.equals('c3 1', apply2_test.apply(c3, [], null)); | 120 expect$.Expect.equals('c3 1', apply2_test.apply(c3, [], null)); |
121 expect$.Expect.equals('c3 2', apply2_test.apply(c3, JSArrayOfint().of([2]),
dart.map())); | 121 expect$.Expect.equals('c3 2', apply2_test.apply(c3, JSArrayOfint().of([2]),
dart.map({}, core.Symbol, dart.dynamic))); |
122 apply2_test.throwsNSME(c3, JSArrayOfint().of([1, 2]), null); | 122 apply2_test.throwsNSME(c3, JSArrayOfint().of([1, 2]), null); |
123 apply2_test.throwsNSME(c3, null, dart.map([const$3 || (const$3 = dart.const(
core.Symbol.new('a'))), 1])); | 123 apply2_test.throwsNSME(c3, null, dart.map([const$3 || (const$3 = dart.const(
core.Symbol.new('a'))), 1], core.Symbol, core.int)); |
124 expect$.Expect.equals('c4 1', apply2_test.apply(c4, [], null)); | 124 expect$.Expect.equals('c4 1', apply2_test.apply(c4, [], null)); |
125 expect$.Expect.equals('c4 2', apply2_test.apply(c4, [], dart.map([const$4 ||
(const$4 = dart.const(core.Symbol.new('a'))), 2]))); | 125 expect$.Expect.equals('c4 2', apply2_test.apply(c4, [], dart.map([const$4 ||
(const$4 = dart.const(core.Symbol.new('a'))), 2], core.Symbol, dart.dynamic))); |
126 expect$.Expect.equals('c4 1', apply2_test.apply(c4, null, null)); | 126 expect$.Expect.equals('c4 1', apply2_test.apply(c4, null, null)); |
127 expect$.Expect.equals('c4 1', apply2_test.apply(c4, [], dart.map())); | 127 expect$.Expect.equals('c4 1', apply2_test.apply(c4, [], dart.map({}, core.Sy
mbol, dart.dynamic))); |
128 apply2_test.throwsNSME(c4, JSArrayOfint().of([1]), dart.map([const$5 || (con
st$5 = dart.const(core.Symbol.new('a'))), 1])); | 128 apply2_test.throwsNSME(c4, JSArrayOfint().of([1]), dart.map([const$5 || (con
st$5 = dart.const(core.Symbol.new('a'))), 1], core.Symbol, core.int)); |
129 apply2_test.throwsNSME(c4, JSArrayOfint().of([1]), dart.map()); | 129 apply2_test.throwsNSME(c4, JSArrayOfint().of([1]), dart.map()); |
130 apply2_test.throwsNSME(c4, [], dart.map([const$6 || (const$6 = dart.const(co
re.Symbol.new('a'))), 1, const$7 || (const$7 = dart.const(core.Symbol.new('b')))
, 2])); | 130 apply2_test.throwsNSME(c4, [], dart.map([const$6 || (const$6 = dart.const(co
re.Symbol.new('a'))), 1, const$7 || (const$7 = dart.const(core.Symbol.new('b')))
, 2], core.Symbol, core.int)); |
131 expect$.Expect.equals('c5 1 2', apply2_test.apply(c5, [], null)); | 131 expect$.Expect.equals('c5 1 2', apply2_test.apply(c5, [], null)); |
132 expect$.Expect.equals('c5 3 2', apply2_test.apply(c5, [], dart.map([const$8
|| (const$8 = dart.const(core.Symbol.new('a'))), 3]))); | 132 expect$.Expect.equals('c5 3 2', apply2_test.apply(c5, [], dart.map([const$8
|| (const$8 = dart.const(core.Symbol.new('a'))), 3], core.Symbol, dart.dynamic))
); |
133 expect$.Expect.equals('c5 1 2', apply2_test.apply(c5, null, null)); | 133 expect$.Expect.equals('c5 1 2', apply2_test.apply(c5, null, null)); |
134 expect$.Expect.equals('c5 1 2', apply2_test.apply(c5, [], dart.map())); | 134 expect$.Expect.equals('c5 1 2', apply2_test.apply(c5, [], dart.map({}, core.
Symbol, dart.dynamic))); |
135 expect$.Expect.equals('c5 3 4', apply2_test.apply(c5, [], dart.map([const$9
|| (const$9 = dart.const(core.Symbol.new('a'))), 3, const$10 || (const$10 = dart
.const(core.Symbol.new('b'))), 4]))); | 135 expect$.Expect.equals('c5 3 4', apply2_test.apply(c5, [], dart.map([const$9
|| (const$9 = dart.const(core.Symbol.new('a'))), 3, const$10 || (const$10 = dart
.const(core.Symbol.new('b'))), 4], core.Symbol, dart.dynamic))); |
136 expect$.Expect.equals('c5 4 3', apply2_test.apply(c5, [], dart.map([const$11
|| (const$11 = dart.const(core.Symbol.new('b'))), 3, const$12 || (const$12 = da
rt.const(core.Symbol.new('a'))), 4]))); | 136 expect$.Expect.equals('c5 4 3', apply2_test.apply(c5, [], dart.map([const$11
|| (const$11 = dart.const(core.Symbol.new('b'))), 3, const$12 || (const$12 = da
rt.const(core.Symbol.new('a'))), 4], core.Symbol, dart.dynamic))); |
137 expect$.Expect.equals('c5 1 3', apply2_test.apply(c5, [], dart.map([const$13
|| (const$13 = dart.const(core.Symbol.new('b'))), 3]))); | 137 expect$.Expect.equals('c5 1 3', apply2_test.apply(c5, [], dart.map([const$13
|| (const$13 = dart.const(core.Symbol.new('b'))), 3], core.Symbol, dart.dynamic
))); |
138 apply2_test.throwsNSME(c5, JSArrayOfint().of([1]), dart.map([const$14 || (co
nst$14 = dart.const(core.Symbol.new('a'))), 1])); | 138 apply2_test.throwsNSME(c5, JSArrayOfint().of([1]), dart.map([const$14 || (co
nst$14 = dart.const(core.Symbol.new('a'))), 1], core.Symbol, core.int)); |
139 apply2_test.throwsNSME(c5, JSArrayOfint().of([1]), dart.map()); | 139 apply2_test.throwsNSME(c5, JSArrayOfint().of([1]), dart.map()); |
140 apply2_test.throwsNSME(c5, [], dart.map([const$15 || (const$15 = dart.const(
core.Symbol.new('a'))), 1, const$16 || (const$16 = dart.const(core.Symbol.new('b
'))), 2, const$17 || (const$17 = dart.const(core.Symbol.new('c'))), 3])); | 140 apply2_test.throwsNSME(c5, [], dart.map([const$15 || (const$15 = dart.const(
core.Symbol.new('a'))), 1, const$16 || (const$16 = dart.const(core.Symbol.new('b
'))), 2, const$17 || (const$17 = dart.const(core.Symbol.new('c'))), 3], core.Sym
bol, core.int)); |
141 expect$.Expect.equals('c6 2 1', apply2_test.apply(c6, [], null)); | 141 expect$.Expect.equals('c6 2 1', apply2_test.apply(c6, [], null)); |
142 expect$.Expect.equals('c6 3 1', apply2_test.apply(c6, [], dart.map([const$18
|| (const$18 = dart.const(core.Symbol.new('a'))), 3]))); | 142 expect$.Expect.equals('c6 3 1', apply2_test.apply(c6, [], dart.map([const$18
|| (const$18 = dart.const(core.Symbol.new('a'))), 3], core.Symbol, dart.dynamic
))); |
143 expect$.Expect.equals('c6 2 1', apply2_test.apply(c6, null, null)); | 143 expect$.Expect.equals('c6 2 1', apply2_test.apply(c6, null, null)); |
144 expect$.Expect.equals('c6 2 1', apply2_test.apply(c6, [], dart.map())); | 144 expect$.Expect.equals('c6 2 1', apply2_test.apply(c6, [], dart.map({}, core.
Symbol, dart.dynamic))); |
145 expect$.Expect.equals('c6 3 4', apply2_test.apply(c6, [], dart.map([const$19
|| (const$19 = dart.const(core.Symbol.new('a'))), 3, const$20 || (const$20 = da
rt.const(core.Symbol.new('b'))), 4]))); | 145 expect$.Expect.equals('c6 3 4', apply2_test.apply(c6, [], dart.map([const$19
|| (const$19 = dart.const(core.Symbol.new('a'))), 3, const$20 || (const$20 = da
rt.const(core.Symbol.new('b'))), 4], core.Symbol, dart.dynamic))); |
146 expect$.Expect.equals('c6 4 3', apply2_test.apply(c6, [], dart.map([const$21
|| (const$21 = dart.const(core.Symbol.new('b'))), 3, const$22 || (const$22 = da
rt.const(core.Symbol.new('a'))), 4]))); | 146 expect$.Expect.equals('c6 4 3', apply2_test.apply(c6, [], dart.map([const$21
|| (const$21 = dart.const(core.Symbol.new('b'))), 3, const$22 || (const$22 = da
rt.const(core.Symbol.new('a'))), 4], core.Symbol, dart.dynamic))); |
147 expect$.Expect.equals('c6 2 3', apply2_test.apply(c6, [], dart.map([const$23
|| (const$23 = dart.const(core.Symbol.new('b'))), 3]))); | 147 expect$.Expect.equals('c6 2 3', apply2_test.apply(c6, [], dart.map([const$23
|| (const$23 = dart.const(core.Symbol.new('b'))), 3], core.Symbol, dart.dynamic
))); |
148 apply2_test.throwsNSME(c6, JSArrayOfint().of([1]), dart.map([const$24 || (co
nst$24 = dart.const(core.Symbol.new('a'))), 1])); | 148 apply2_test.throwsNSME(c6, JSArrayOfint().of([1]), dart.map([const$24 || (co
nst$24 = dart.const(core.Symbol.new('a'))), 1], core.Symbol, core.int)); |
149 apply2_test.throwsNSME(c6, JSArrayOfint().of([1]), dart.map()); | 149 apply2_test.throwsNSME(c6, JSArrayOfint().of([1]), dart.map()); |
150 apply2_test.throwsNSME(c6, [], dart.map([const$25 || (const$25 = dart.const(
core.Symbol.new('a'))), 1, const$26 || (const$26 = dart.const(core.Symbol.new('b
'))), 2, const$27 || (const$27 = dart.const(core.Symbol.new('c'))), 3])); | 150 apply2_test.throwsNSME(c6, [], dart.map([const$25 || (const$25 = dart.const(
core.Symbol.new('a'))), 1, const$26 || (const$26 = dart.const(core.Symbol.new('b
'))), 2, const$27 || (const$27 = dart.const(core.Symbol.new('c'))), 3], core.Sym
bol, core.int)); |
151 expect$.Expect.equals('c7 7 2 1', apply2_test.apply(c7, JSArrayOfint().of([7
]), null)); | 151 expect$.Expect.equals('c7 7 2 1', apply2_test.apply(c7, JSArrayOfint().of([7
]), null)); |
152 expect$.Expect.equals('c7 7 3 1', apply2_test.apply(c7, JSArrayOfint().of([7
]), dart.map([const$28 || (const$28 = dart.const(core.Symbol.new('a'))), 3]))); | 152 expect$.Expect.equals('c7 7 3 1', apply2_test.apply(c7, JSArrayOfint().of([7
]), dart.map([const$28 || (const$28 = dart.const(core.Symbol.new('a'))), 3], cor
e.Symbol, dart.dynamic))); |
153 expect$.Expect.equals('c7 7 2 1', apply2_test.apply(c7, JSArrayOfint().of([7
]), dart.map())); | 153 expect$.Expect.equals('c7 7 2 1', apply2_test.apply(c7, JSArrayOfint().of([7
]), dart.map({}, core.Symbol, dart.dynamic))); |
154 expect$.Expect.equals('c7 7 3 4', apply2_test.apply(c7, JSArrayOfint().of([7
]), dart.map([const$29 || (const$29 = dart.const(core.Symbol.new('a'))), 3, cons
t$30 || (const$30 = dart.const(core.Symbol.new('b'))), 4]))); | 154 expect$.Expect.equals('c7 7 3 4', apply2_test.apply(c7, JSArrayOfint().of([7
]), dart.map([const$29 || (const$29 = dart.const(core.Symbol.new('a'))), 3, cons
t$30 || (const$30 = dart.const(core.Symbol.new('b'))), 4], core.Symbol, dart.dyn
amic))); |
155 expect$.Expect.equals('c7 7 4 3', apply2_test.apply(c7, JSArrayOfint().of([7
]), dart.map([const$31 || (const$31 = dart.const(core.Symbol.new('b'))), 3, cons
t$32 || (const$32 = dart.const(core.Symbol.new('a'))), 4]))); | 155 expect$.Expect.equals('c7 7 4 3', apply2_test.apply(c7, JSArrayOfint().of([7
]), dart.map([const$31 || (const$31 = dart.const(core.Symbol.new('b'))), 3, cons
t$32 || (const$32 = dart.const(core.Symbol.new('a'))), 4], core.Symbol, dart.dyn
amic))); |
156 expect$.Expect.equals('c7 7 2 3', apply2_test.apply(c7, JSArrayOfint().of([7
]), dart.map([const$33 || (const$33 = dart.const(core.Symbol.new('b'))), 3]))); | 156 expect$.Expect.equals('c7 7 2 3', apply2_test.apply(c7, JSArrayOfint().of([7
]), dart.map([const$33 || (const$33 = dart.const(core.Symbol.new('b'))), 3], cor
e.Symbol, dart.dynamic))); |
157 apply2_test.throwsNSME(c7, [], dart.map([const$34 || (const$34 = dart.const(
core.Symbol.new('a'))), 1])); | 157 apply2_test.throwsNSME(c7, [], dart.map([const$34 || (const$34 = dart.const(
core.Symbol.new('a'))), 1], core.Symbol, core.int)); |
158 apply2_test.throwsNSME(c7, [], dart.map()); | 158 apply2_test.throwsNSME(c7, [], dart.map()); |
159 apply2_test.throwsNSME(c7, JSArrayOfint().of([7]), dart.map([const$35 || (co
nst$35 = dart.const(core.Symbol.new('a'))), 1, const$36 || (const$36 = dart.cons
t(core.Symbol.new('b'))), 2, const$37 || (const$37 = dart.const(core.Symbol.new(
'c'))), 3])); | 159 apply2_test.throwsNSME(c7, JSArrayOfint().of([7]), dart.map([const$35 || (co
nst$35 = dart.const(core.Symbol.new('a'))), 1, const$36 || (const$36 = dart.cons
t(core.Symbol.new('b'))), 2, const$37 || (const$37 = dart.const(core.Symbol.new(
'c'))), 3], core.Symbol, core.int)); |
160 expect$.Expect.equals('c8 7 8 2 3', apply2_test.apply(c8, JSArrayOfint().of(
[7, 8]), null)); | 160 expect$.Expect.equals('c8 7 8 2 3', apply2_test.apply(c8, JSArrayOfint().of(
[7, 8]), null)); |
161 expect$.Expect.equals('c8 7 8 2 3', apply2_test.apply(c8, JSArrayOfint().of(
[7, 8]), dart.map())); | 161 expect$.Expect.equals('c8 7 8 2 3', apply2_test.apply(c8, JSArrayOfint().of(
[7, 8]), dart.map({}, core.Symbol, dart.dynamic))); |
162 expect$.Expect.equals('c8 7 8 3 3', apply2_test.apply(c8, JSArrayOfint().of(
[7, 8, 3]), null)); | 162 expect$.Expect.equals('c8 7 8 3 3', apply2_test.apply(c8, JSArrayOfint().of(
[7, 8, 3]), null)); |
163 expect$.Expect.equals('c8 7 8 3 4', apply2_test.apply(c8, JSArrayOfint().of(
[7, 8, 3, 4]), null)); | 163 expect$.Expect.equals('c8 7 8 3 4', apply2_test.apply(c8, JSArrayOfint().of(
[7, 8, 3, 4]), null)); |
164 apply2_test.throwsNSME(c8, [], null); | 164 apply2_test.throwsNSME(c8, [], null); |
165 apply2_test.throwsNSME(c8, [], dart.map()); | 165 apply2_test.throwsNSME(c8, [], dart.map()); |
166 apply2_test.throwsNSME(c8, JSArrayOfint().of([1]), null); | 166 apply2_test.throwsNSME(c8, JSArrayOfint().of([1]), null); |
167 apply2_test.throwsNSME(c8, JSArrayOfint().of([7, 8, 9, 10, 11]), null); | 167 apply2_test.throwsNSME(c8, JSArrayOfint().of([7, 8, 9, 10, 11]), null); |
168 }; | 168 }; |
169 dart.fn(apply2_test.main, VoidTodynamic()); | 169 dart.fn(apply2_test.main, VoidTodynamic()); |
170 // Exports: | 170 // Exports: |
171 exports.apply2_test = apply2_test; | 171 exports.apply2_test = apply2_test; |
172 }); | 172 }); |
OLD | NEW |