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

Side by Side Diff: test/codegen/expect/syncstar_yieldstar_test.js

Issue 1243503007: fixes #221, initial sync*, async, async* implementation (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 dart_library.library('syncstar_yieldstar_test', null, /* Imports */[
2 "dart_runtime/dart",
3 'dart/core',
4 'expect'
5 ], /* Lazy imports */[
6 ], function(exports, dart, core, expect) {
7 'use strict';
8 let dartx = dart.dartx;
9 function* bar() {
10 let i = 1;
11 let j = 1;
12 while (true) {
13 yield i;
14 j = dart.notNull(i) + dart.notNull(j);
15 i = dart.notNull(j) - dart.notNull(i);
16 }
17 }
18 dart.fn(bar);
19 function* foo() {
20 yield* [1, 2, 3];
21 yield null;
22 yield* dart.as(bar(), core.Iterable);
23 }
24 dart.fn(foo);
25 function main() {
26 expect.Expect.listEquals([1, 2, 3, null, 1, 1, 2, 3, 5], dart.as(dart.dsend( dart.dsend(foo(), 'take', 9), 'toList'), core.List));
27 }
28 dart.fn(main);
29 // Exports:
30 exports.bar = bar;
31 exports.foo = foo;
32 exports.main = main;
33 });
OLDNEW
« no previous file with comments | « test/codegen/expect/syncstar_yield_test.txt ('k') | test/codegen/expect/syncstar_yieldstar_test.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698