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

Side by Side Diff: test/codegen/expect/language/closure_test.js

Issue 2128353002: Check in codegen test expectations. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 dart_library.library('language/closure_test', null, /* Imports */[
2 'dart_sdk',
3 'expect'
4 ], function load__closure_test(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 closure_test = Object.create(null);
11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))();
12 closure_test.A = class A extends core.Object {
13 new(field) {
14 this.field = field;
15 }
16 };
17 dart.setSignature(closure_test.A, {
18 constructors: () => ({new: dart.definiteFunctionType(closure_test.A, [dart.d ynamic])})
19 });
20 closure_test.ClosureTest = class ClosureTest extends core.Object {
21 static testMain() {
22 let o = new closure_test.A(3);
23 function foo() {
24 return (() => {
25 let x = o.field;
26 o.field = dart.dsend(x, '+', 1);
27 return x;
28 })();
29 }
30 dart.fn(foo, VoidTodynamic());
31 expect$.Expect.equals(3, foo());
32 expect$.Expect.equals(4, o.field);
33 }
34 };
35 dart.setSignature(closure_test.ClosureTest, {
36 statics: () => ({testMain: dart.definiteFunctionType(dart.dynamic, [])}),
37 names: ['testMain']
38 });
39 closure_test.main = function() {
40 closure_test.ClosureTest.testMain();
41 };
42 dart.fn(closure_test.main, VoidTodynamic());
43 // Exports:
44 exports.closure_test = closure_test;
45 });
OLDNEW
« no previous file with comments | « test/codegen/expect/language/closure_side_effect_test.js ('k') | test/codegen/expect/language/closure_type_test_01_multi.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698