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

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

Issue 1988503002: Move generated files to gen/. (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Revise. Created 4 years, 7 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
« no previous file with comments | « test/codegen/expect/sunflower/sunflower.js.map ('k') | test/codegen/expect/syncstar_syntax.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 dart_library.library('syncstar_syntax', null, /* Imports */[
2 'dart_sdk',
3 'expect'
4 ], function(exports, dart_sdk, expect) {
5 'use strict';
6 const core = dart_sdk.core;
7 const dart = dart_sdk.dart;
8 const dartx = dart_sdk.dartx;
9 const expect$ = expect.expect;
10 const syncstar_syntax = Object.create(null);
11 syncstar_syntax.foo = function() {
12 return dart.syncStar(function*() {
13 yield 1;
14 yield* dart.list([2, 3], core.int);
15 }, core.int);
16 };
17 dart.fn(syncstar_syntax.foo, core.Iterable$(core.int), []);
18 syncstar_syntax.Class = class Class extends core.Object {
19 bar() {
20 return dart.syncStar(function*() {
21 yield 1;
22 yield* dart.list([2, 3], core.int);
23 }, core.int);
24 }
25 static baz() {
26 return dart.syncStar(function*() {
27 yield 1;
28 yield* dart.list([2, 3], core.int);
29 }, core.int);
30 }
31 };
32 dart.setSignature(syncstar_syntax.Class, {
33 methods: () => ({bar: [core.Iterable$(core.int), []]}),
34 statics: () => ({baz: [core.Iterable$(core.int), []]}),
35 names: ['baz']
36 });
37 syncstar_syntax.main = function() {
38 function qux() {
39 return dart.syncStar(function*() {
40 yield 1;
41 yield* dart.list([2, 3], core.int);
42 }, core.int);
43 }
44 dart.fn(qux, core.Iterable$(core.int), []);
45 expect$.Expect.listEquals(dart.list([1, 2, 3], core.int), syncstar_syntax.fo o()[dartx.toList]());
46 expect$.Expect.listEquals(dart.list([1, 2, 3], core.int), new syncstar_synta x.Class().bar()[dartx.toList]());
47 expect$.Expect.listEquals(dart.list([1, 2, 3], core.int), syncstar_syntax.Cl ass.baz()[dartx.toList]());
48 expect$.Expect.listEquals(dart.list([1, 2, 3], core.int), qux()[dartx.toList ]());
49 };
50 dart.fn(syncstar_syntax.main);
51 // Exports:
52 exports.syncstar_syntax = syncstar_syntax;
53 });
OLDNEW
« no previous file with comments | « test/codegen/expect/sunflower/sunflower.js.map ('k') | test/codegen/expect/syncstar_syntax.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698