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

Unified Diff: test/codegen/expect/syncstar_yield_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, 5 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/syncstar_syntax.txt ('k') | test/codegen/expect/syncstar_yield_test.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/syncstar_yield_test.js
diff --git a/test/codegen/expect/syncstar_yield_test.js b/test/codegen/expect/syncstar_yield_test.js
deleted file mode 100644
index c4f40302926bf129fe6db4672d2d3cfd22d6f924..0000000000000000000000000000000000000000
--- a/test/codegen/expect/syncstar_yield_test.js
+++ /dev/null
@@ -1,59 +0,0 @@
-dart_library.library('syncstar_yield_test', null, /* Imports */[
- "dart_runtime/dart",
- 'dart/core',
- 'expect'
-], /* Lazy imports */[
-], function(exports, dart, core, expect) {
- 'use strict';
- let dartx = dart.dartx;
- function* foo1() {
- yield 1;
- }
- dart.fn(foo1, core.Iterable$(core.int), []);
- function* foo2(p) {
- let t = false;
- yield null;
- while (true) {
- a:
- for (let i = 0; dart.notNull(i) < dart.notNull(dart.as(p, core.num)); i = dart.notNull(i) + 1) {
- if (!dart.notNull(t)) {
- for (let j = 0; dart.notNull(j) < 3; j = dart.notNull(j) + 1) {
- yield -1;
- t = true;
- break a;
- }
- }
- yield i;
- }
- }
- }
- dart.fn(foo2, core.Iterable$(core.int), [dart.dynamic]);
- function* foo3(p) {
- let i = 0;
- i = dart.notNull(i) + 1;
- p = dart.notNull(p) + 1;
- yield dart.notNull(p) + dart.notNull(i);
- }
- dart.fn(foo3, core.Iterable$(core.int), [core.int]);
- function main() {
- expect.Expect.listEquals([1], foo1()[dartx.toList]());
- expect.Expect.listEquals([null, -1, 0, 1, 2, 3, 0, 1, 2, 3], foo2(4)[dartx.take](10)[dartx.toList]());
- let t = foo3(0);
- let it1 = t[dartx.iterator];
- let it2 = t[dartx.iterator];
- it1.moveNext();
- it2.moveNext();
- expect.Expect.equals(2, it1.current);
- expect.Expect.equals(2, it2.current);
- expect.Expect.isFalse(it1.moveNext());
- expect.Expect.isFalse(it1.moveNext());
- expect.Expect.isFalse(it2.moveNext());
- expect.Expect.isFalse(it2.moveNext());
- }
- dart.fn(main);
- // Exports:
- exports.foo1 = foo1;
- exports.foo2 = foo2;
- exports.foo3 = foo3;
- exports.main = main;
-});
« no previous file with comments | « test/codegen/expect/syncstar_syntax.txt ('k') | test/codegen/expect/syncstar_yield_test.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698