Index: test/codegen/expect/syncstar_syntax.js |
diff --git a/test/codegen/expect/syncstar_syntax.js b/test/codegen/expect/syncstar_syntax.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..418b39aa9ca49e057438ca9fccbd2cc694d60da7 |
--- /dev/null |
+++ b/test/codegen/expect/syncstar_syntax.js |
@@ -0,0 +1,44 @@ |
+dart_library.library('syncstar_syntax', null, /* Imports */[ |
+ "dart_runtime/dart", |
+ 'dart/core' |
+], /* Lazy imports */[ |
+], function(exports, dart, core) { |
+ 'use strict'; |
+ let dartx = dart.dartx; |
+ function* foo() { |
+ yield 1; |
+ yield* dart.list([2, 3], core.int); |
+ } |
+ dart.fn(foo, core.Iterable$(core.int), []); |
+ class Class extends core.Object { |
+ *bar() { |
+ yield 1; |
+ yield* dart.list([2, 3], core.int); |
+ } |
+ static *baz() { |
+ yield 1; |
+ yield* dart.list([2, 3], core.int); |
+ } |
+ } |
+ dart.setSignature(Class, { |
+ methods: () => ({bar: [core.Iterable$(core.int), []]}), |
+ statics: () => ({baz: [core.Iterable$(core.int), []]}), |
+ names: ['baz'] |
+ }); |
+ function main() { |
+ function* qux() { |
+ yield 1; |
+ yield* dart.list([2, 3], core.int); |
+ } |
+ dart.fn(qux, core.Iterable$(core.int), []); |
+ foo()[dartx.forEach](core.print); |
+ new Class().bar()[dartx.forEach](core.print); |
+ Class.baz()[dartx.forEach](core.print); |
+ qux()[dartx.forEach](core.print); |
+ } |
+ dart.fn(main); |
+ // Exports: |
+ exports.foo = foo; |
+ exports.Class = Class; |
+ exports.main = main; |
+}); |