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

Unified Diff: test/codegen/expect/syncstar_syntax.js

Issue 1207313002: initial sync*, part of #221 (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/codegen/expect/expect.txt ('k') | test/codegen/expect/syncstar_syntax.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
+});
« no previous file with comments | « test/codegen/expect/expect.txt ('k') | test/codegen/expect/syncstar_syntax.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698