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

Side by Side Diff: test/codegen/expect/language/factory_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/factory_test', null, /* Imports */[
2 'dart_sdk',
3 'expect'
4 ], function load__factory_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 factory_test = Object.create(null);
11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))();
12 factory_test.A = class A extends core.Object {
13 static new(n) {
14 return new factory_test.A.internal(n);
15 }
16 internal(n) {
17 this.n_ = n;
18 }
19 };
20 dart.defineNamedConstructor(factory_test.A, 'internal');
21 dart.setSignature(factory_test.A, {
22 constructors: () => ({
23 new: dart.definiteFunctionType(factory_test.A, [dart.dynamic]),
24 internal: dart.definiteFunctionType(factory_test.A, [dart.dynamic])
25 })
26 });
27 factory_test.B = class B extends core.Object {
28 static my() {
29 return new factory_test.B(3);
30 }
31 new(n) {
32 this.n_ = n;
33 }
34 };
35 dart.setSignature(factory_test.B, {
36 constructors: () => ({
37 my: dart.definiteFunctionType(factory_test.B, []),
38 new: dart.definiteFunctionType(factory_test.B, [dart.dynamic])
39 })
40 });
41 factory_test.FactoryTest = class FactoryTest extends core.Object {
42 static testMain() {
43 factory_test.B.my();
44 let b = factory_test.B.my();
45 expect$.Expect.equals(3, b.n_);
46 let a = factory_test.A.new(5);
47 expect$.Expect.equals(5, a.n_);
48 }
49 };
50 dart.setSignature(factory_test.FactoryTest, {
51 statics: () => ({testMain: dart.definiteFunctionType(dart.dynamic, [])}),
52 names: ['testMain']
53 });
54 factory_test.main = function() {
55 factory_test.FactoryTest.testMain();
56 };
57 dart.fn(factory_test.main, VoidTodynamic());
58 // Exports:
59 exports.factory_test = factory_test;
60 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698