OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/many_named_arguments_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__many_named_arguments_test(exports, dart_sdk, expect) { |
| 5 'use strict'; |
| 6 const core = dart_sdk.core; |
| 7 const dart = dart_sdk.dart; |
| 8 const dartx = dart_sdk.dartx; |
| 9 const expect$ = expect.expect; |
| 10 const many_named_arguments_test = Object.create(null); |
| 11 let MapOfSymbol$dynamic = () => (MapOfSymbol$dynamic = dart.constFn(core.Map$(
core.Symbol, dart.dynamic)))(); |
| 12 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 13 many_named_arguments_test.Fisk = class Fisk extends core.Object { |
| 14 method(opts) { |
| 15 let a = opts && 'a' in opts ? opts.a : 'a'; |
| 16 let b = opts && 'b' in opts ? opts.b : 'b'; |
| 17 let c = opts && 'c' in opts ? opts.c : 'c'; |
| 18 let d = opts && 'd' in opts ? opts.d : 'd'; |
| 19 let e = opts && 'e' in opts ? opts.e : 'e'; |
| 20 let f = opts && 'f' in opts ? opts.f : 'f'; |
| 21 let g = opts && 'g' in opts ? opts.g : 'g'; |
| 22 let h = opts && 'h' in opts ? opts.h : 'h'; |
| 23 let i = opts && 'i' in opts ? opts.i : 'i'; |
| 24 let j = opts && 'j' in opts ? opts.j : 'j'; |
| 25 let k = opts && 'k' in opts ? opts.k : 'k'; |
| 26 let l = opts && 'l' in opts ? opts.l : 'l'; |
| 27 let m = opts && 'm' in opts ? opts.m : 'm'; |
| 28 let n = opts && 'n' in opts ? opts.n : 'n'; |
| 29 let o = opts && 'o' in opts ? opts.o : 'o'; |
| 30 let p = opts && 'p' in opts ? opts.p : 'p'; |
| 31 let q = opts && 'q' in opts ? opts.q : 'q'; |
| 32 let r = opts && 'r' in opts ? opts.r : 'r'; |
| 33 let s = opts && 's' in opts ? opts.s : 's'; |
| 34 let t = opts && 't' in opts ? opts.t : 't'; |
| 35 let u = opts && 'u' in opts ? opts.u : 'u'; |
| 36 let v = opts && 'v' in opts ? opts.v : 'v'; |
| 37 let w = opts && 'w' in opts ? opts.w : 'w'; |
| 38 let x = opts && 'x' in opts ? opts.x : 'x'; |
| 39 let y = opts && 'y' in opts ? opts.y : 'y'; |
| 40 let z = opts && 'z' in opts ? opts.z : 'z'; |
| 41 return dart.str`a: ${a}, ` + dart.str`b: ${b}, ` + dart.str`c: ${c}, ` + d
art.str`d: ${d}, ` + dart.str`e: ${e}, ` + dart.str`f: ${f}, ` + dart.str`g: ${g
}, ` + dart.str`h: ${h}, ` + dart.str`i: ${i}, ` + dart.str`j: ${j}, ` + dart.st
r`k: ${k}, ` + dart.str`l: ${l}, ` + dart.str`m: ${m}, ` + dart.str`n: ${n}, ` +
dart.str`o: ${o}, ` + dart.str`p: ${p}, ` + dart.str`q: ${q}, ` + dart.str`r: $
{r}, ` + dart.str`s: ${s}, ` + dart.str`t: ${t}, ` + dart.str`u: ${u}, ` + dart.
str`v: ${v}, ` + dart.str`w: ${w}, ` + dart.str`x: ${x}, ` + dart.str`y: ${y}, `
+ dart.str`z: ${z}`; |
| 42 } |
| 43 }; |
| 44 dart.setSignature(many_named_arguments_test.Fisk, { |
| 45 methods: () => ({method: dart.definiteFunctionType(dart.dynamic, [], {a: dar
t.dynamic, b: dart.dynamic, c: dart.dynamic, d: dart.dynamic, e: dart.dynamic, f
: dart.dynamic, g: dart.dynamic, h: dart.dynamic, i: dart.dynamic, j: dart.dynam
ic, k: dart.dynamic, l: dart.dynamic, m: dart.dynamic, n: dart.dynamic, o: dart.
dynamic, p: dart.dynamic, q: dart.dynamic, r: dart.dynamic, s: dart.dynamic, t:
dart.dynamic, u: dart.dynamic, v: dart.dynamic, w: dart.dynamic, x: dart.dynamic
, y: dart.dynamic, z: dart.dynamic})}) |
| 46 }); |
| 47 let const$; |
| 48 many_named_arguments_test.main = function() { |
| 49 let method = dart.bind(new many_named_arguments_test.Fisk(), 'method'); |
| 50 let namedArguments = core.Map.new(); |
| 51 namedArguments[dartx.set](const$ || (const$ = dart.const(core.Symbol.new('a'
))), 'a'); |
| 52 expect$.Expect.stringEquals(many_named_arguments_test.EXPECTED_RESULT, core.
String._check(core.Function.apply(method, [], MapOfSymbol$dynamic()._check(named
Arguments)))); |
| 53 expect$.Expect.stringEquals(many_named_arguments_test.EXPECTED_RESULT, core.
String._check(new many_named_arguments_test.Fisk().method({a: 'a', b: 'b', c: 'c
', d: 'd', e: 'e', f: 'f', g: 'g', h: 'h', i: 'i', j: 'j', k: 'k', l: 'l', m: 'm
', n: 'n', o: 'o', p: 'p', q: 'q', r: 'r', s: 's', t: 't', u: 'u', v: 'v', w: 'w
', x: 'x', y: 'y', z: 'z'}))); |
| 54 }; |
| 55 dart.fn(many_named_arguments_test.main, VoidTodynamic()); |
| 56 many_named_arguments_test.EXPECTED_RESULT = 'a: a, ' + 'b: b, ' + 'c: c, ' + '
d: d, ' + 'e: e, ' + 'f: f, ' + 'g: g, ' + 'h: h, ' + 'i: i, ' + 'j: j, ' + 'k:
k, ' + 'l: l, ' + 'm: m, ' + 'n: n, ' + 'o: o, ' + 'p: p, ' + 'q: q, ' + 'r: r,
' + 's: s, ' + 't: t, ' + 'u: u, ' + 'v: v, ' + 'w: w, ' + 'x: x, ' + 'y: y, ' +
'z: z'; |
| 57 // Exports: |
| 58 exports.many_named_arguments_test = many_named_arguments_test; |
| 59 }); |
OLD | NEW |