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

Side by Side Diff: test/codegen/expect/language/compile_time_constant_g_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/compile_time_constant_g_test', null, /* Imports * /[
2 'dart_sdk',
3 'expect'
4 ], function load__compile_time_constant_g_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 compile_time_constant_g_test = Object.create(null);
11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))();
12 compile_time_constant_g_test.A = class A extends core.Object {
13 new(x) {
14 this.x = x;
15 }
16 named(x) {
17 if (x === void 0) x = null;
18 this.x = x;
19 }
20 named2(x) {
21 if (x === void 0) x = 2;
22 this.x = x;
23 }
24 };
25 dart.defineNamedConstructor(compile_time_constant_g_test.A, 'named');
26 dart.defineNamedConstructor(compile_time_constant_g_test.A, 'named2');
27 dart.setSignature(compile_time_constant_g_test.A, {
28 constructors: () => ({
29 new: dart.definiteFunctionType(compile_time_constant_g_test.A, [dart.dynam ic]),
30 named: dart.definiteFunctionType(compile_time_constant_g_test.A, [], [dart .dynamic]),
31 named2: dart.definiteFunctionType(compile_time_constant_g_test.A, [], [dar t.dynamic])
32 })
33 });
34 compile_time_constant_g_test.B = class B extends compile_time_constant_g_test. A {
35 new(x) {
36 super.new(dart.dsend(x, '+', 10));
37 }
38 named_() {
39 super.named();
40 }
41 named(x) {
42 super.named(dart.dsend(x, '+', 10));
43 }
44 named2_() {
45 super.named2();
46 }
47 named2(x) {
48 super.named2(dart.dsend(x, '+', 10));
49 }
50 };
51 dart.defineNamedConstructor(compile_time_constant_g_test.B, 'named_');
52 dart.defineNamedConstructor(compile_time_constant_g_test.B, 'named');
53 dart.defineNamedConstructor(compile_time_constant_g_test.B, 'named2_');
54 dart.defineNamedConstructor(compile_time_constant_g_test.B, 'named2');
55 dart.setSignature(compile_time_constant_g_test.B, {
56 constructors: () => ({
57 new: dart.definiteFunctionType(compile_time_constant_g_test.B, [dart.dynam ic]),
58 named_: dart.definiteFunctionType(compile_time_constant_g_test.B, []),
59 named: dart.definiteFunctionType(compile_time_constant_g_test.B, [dart.dyn amic]),
60 named2_: dart.definiteFunctionType(compile_time_constant_g_test.B, []),
61 named2: dart.definiteFunctionType(compile_time_constant_g_test.B, [dart.dy namic])
62 })
63 });
64 compile_time_constant_g_test.b1 = dart.const(new compile_time_constant_g_test. B(0));
65 compile_time_constant_g_test.b2 = dart.const(new compile_time_constant_g_test. B.named_());
66 compile_time_constant_g_test.b3 = dart.const(new compile_time_constant_g_test. B.named(1));
67 compile_time_constant_g_test.b4 = dart.const(new compile_time_constant_g_test. B.named2_());
68 compile_time_constant_g_test.b5 = dart.const(new compile_time_constant_g_test. B.named2(3));
69 compile_time_constant_g_test.main = function() {
70 expect$.Expect.equals(10, compile_time_constant_g_test.b1.x);
71 expect$.Expect.equals(null, compile_time_constant_g_test.b2.x);
72 expect$.Expect.equals(11, compile_time_constant_g_test.b3.x);
73 expect$.Expect.equals(2, compile_time_constant_g_test.b4.x);
74 expect$.Expect.equals(13, compile_time_constant_g_test.b5.x);
75 };
76 dart.fn(compile_time_constant_g_test.main, VoidTodynamic());
77 // Exports:
78 exports.compile_time_constant_g_test = compile_time_constant_g_test;
79 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698