OLD | NEW |
1 dart_library.library('syncstar_syntax', null, /* Imports */[ | 1 dart_library.library('syncstar_syntax', null, /* Imports */[ |
2 'dart/_runtime', | 2 'dart/_runtime', |
3 'dart/core', | 3 'dart/core', |
4 'expect/expect' | 4 'expect/expect' |
5 ], /* Lazy imports */[ | 5 ], /* Lazy imports */[ |
6 ], function(exports, dart, core, expect) { | 6 ], function(exports, dart, core, expect) { |
7 'use strict'; | 7 'use strict'; |
8 let dartx = dart.dartx; | 8 let dartx = dart.dartx; |
9 function foo() { | 9 function foo() { |
10 return dart.syncStar(function*() { | 10 return dart.syncStar(function*() { |
(...skipping 22 matching lines...) Expand all Loading... |
33 names: ['baz'] | 33 names: ['baz'] |
34 }); | 34 }); |
35 function main() { | 35 function main() { |
36 function qux() { | 36 function qux() { |
37 return dart.syncStar(function*() { | 37 return dart.syncStar(function*() { |
38 yield 1; | 38 yield 1; |
39 yield* dart.list([2, 3], core.int); | 39 yield* dart.list([2, 3], core.int); |
40 }, core.int); | 40 }, core.int); |
41 } | 41 } |
42 dart.fn(qux, core.Iterable$(core.int), []); | 42 dart.fn(qux, core.Iterable$(core.int), []); |
43 expect.Expect.listEquals([1, 2, 3], foo()[dartx.toList]()); | 43 expect.Expect.listEquals(dart.list([1, 2, 3], core.int), foo()[dartx.toList]
()); |
44 expect.Expect.listEquals([1, 2, 3], new Class().bar()[dartx.toList]()); | 44 expect.Expect.listEquals(dart.list([1, 2, 3], core.int), new Class().bar()[d
artx.toList]()); |
45 expect.Expect.listEquals([1, 2, 3], Class.baz()[dartx.toList]()); | 45 expect.Expect.listEquals(dart.list([1, 2, 3], core.int), Class.baz()[dartx.t
oList]()); |
46 expect.Expect.listEquals([1, 2, 3], qux()[dartx.toList]()); | 46 expect.Expect.listEquals(dart.list([1, 2, 3], core.int), qux()[dartx.toList]
()); |
47 } | 47 } |
48 dart.fn(main); | 48 dart.fn(main); |
49 // Exports: | 49 // Exports: |
50 exports.foo = foo; | 50 exports.foo = foo; |
51 exports.Class = Class; | 51 exports.Class = Class; |
52 exports.main = main; | 52 exports.main = main; |
53 }); | 53 }); |
OLD | NEW |