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

Side by Side Diff: test/codegen/expect/language/mixin_bound_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/mixin_bound_test', null, /* Imports */[
2 'dart_sdk',
3 'expect'
4 ], function load__mixin_bound_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 mixin_bound_test = Object.create(null);
11 let AbstractAddition = () => (AbstractAddition = dart.constFn(mixin_bound_test .AbstractAddition$()))();
12 let AbstractSubtraction = () => (AbstractSubtraction = dart.constFn(mixin_boun d_test.AbstractSubtraction$()))();
13 let AdditionWithEval = () => (AdditionWithEval = dart.constFn(mixin_bound_test .AdditionWithEval$()))();
14 let SubtractionWithEval = () => (SubtractionWithEval = dart.constFn(mixin_boun d_test.SubtractionWithEval$()))();
15 let AbstractMultiplication = () => (AbstractMultiplication = dart.constFn(mixi n_bound_test.AbstractMultiplication$()))();
16 let MultiplicationWithEval = () => (MultiplicationWithEval = dart.constFn(mixi n_bound_test.MultiplicationWithEval$()))();
17 let AdditionWithStringConversion = () => (AdditionWithStringConversion = dart. constFn(mixin_bound_test.AdditionWithStringConversion$()))();
18 let SubtractionWithStringConversion = () => (SubtractionWithStringConversion = dart.constFn(mixin_bound_test.SubtractionWithStringConversion$()))();
19 let MultiplicationWithStringConversion = () => (MultiplicationWithStringConver sion = dart.constFn(mixin_bound_test.MultiplicationWithStringConversion$()))();
20 let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(da rt.void, [])))();
21 mixin_bound_test.AbstractExpression = class AbstractExpression extends core.Ob ject {};
22 mixin_bound_test.AbstractAddition$ = dart.generic(E => {
23 class AbstractAddition extends core.Object {
24 new(operand1, operand2) {
25 this.operand1 = operand1;
26 this.operand2 = operand2;
27 }
28 }
29 dart.addTypeTests(AbstractAddition);
30 dart.setSignature(AbstractAddition, {
31 constructors: () => ({new: dart.definiteFunctionType(mixin_bound_test.Abst ractAddition$(E), [E, E])})
32 });
33 return AbstractAddition;
34 });
35 mixin_bound_test.AbstractAddition = AbstractAddition();
36 mixin_bound_test.AbstractSubtraction$ = dart.generic(E => {
37 class AbstractSubtraction extends core.Object {
38 new(operand1, operand2) {
39 this.operand1 = operand1;
40 this.operand2 = operand2;
41 }
42 }
43 dart.addTypeTests(AbstractSubtraction);
44 dart.setSignature(AbstractSubtraction, {
45 constructors: () => ({new: dart.definiteFunctionType(mixin_bound_test.Abst ractSubtraction$(E), [E, E])})
46 });
47 return AbstractSubtraction;
48 });
49 mixin_bound_test.AbstractSubtraction = AbstractSubtraction();
50 mixin_bound_test.AbstractNumber = class AbstractNumber extends core.Object {
51 new(val) {
52 this.val = val;
53 }
54 };
55 dart.setSignature(mixin_bound_test.AbstractNumber, {
56 constructors: () => ({new: dart.definiteFunctionType(mixin_bound_test.Abstra ctNumber, [core.int])})
57 });
58 mixin_bound_test.ExpressionWithEval = class ExpressionWithEval extends core.Ob ject {};
59 mixin_bound_test.AdditionWithEval$ = dart.generic(E => {
60 class AdditionWithEval extends core.Object {
61 get eval() {
62 return dart.notNull(this.operand1.eval) + dart.notNull(this.operand2.eva l);
63 }
64 }
65 dart.addTypeTests(AdditionWithEval);
66 return AdditionWithEval;
67 });
68 mixin_bound_test.AdditionWithEval = AdditionWithEval();
69 mixin_bound_test.SubtractionWithEval$ = dart.generic(E => {
70 class SubtractionWithEval extends core.Object {
71 get eval() {
72 return dart.notNull(this.operand1.eval) - dart.notNull(this.operand2.eva l);
73 }
74 }
75 dart.addTypeTests(SubtractionWithEval);
76 return SubtractionWithEval;
77 });
78 mixin_bound_test.SubtractionWithEval = SubtractionWithEval();
79 mixin_bound_test.NumberWithEval = class NumberWithEval extends core.Object {
80 get eval() {
81 return this.val;
82 }
83 };
84 mixin_bound_test.AbstractMultiplication$ = dart.generic(E => {
85 class AbstractMultiplication extends core.Object {
86 new(operand1, operand2) {
87 this.operand1 = operand1;
88 this.operand2 = operand2;
89 }
90 }
91 dart.addTypeTests(AbstractMultiplication);
92 dart.setSignature(AbstractMultiplication, {
93 constructors: () => ({new: dart.definiteFunctionType(mixin_bound_test.Abst ractMultiplication$(E), [E, E])})
94 });
95 return AbstractMultiplication;
96 });
97 mixin_bound_test.AbstractMultiplication = AbstractMultiplication();
98 mixin_bound_test.MultiplicationWithEval$ = dart.generic(E => {
99 class MultiplicationWithEval extends core.Object {
100 get eval() {
101 return dart.notNull(this.operand1.eval) * dart.notNull(this.operand2.eva l);
102 }
103 }
104 dart.addTypeTests(MultiplicationWithEval);
105 return MultiplicationWithEval;
106 });
107 mixin_bound_test.MultiplicationWithEval = MultiplicationWithEval();
108 mixin_bound_test.ExpressionWithStringConversion = class ExpressionWithStringCo nversion extends core.Object {};
109 mixin_bound_test.AdditionWithStringConversion$ = dart.generic(E => {
110 class AdditionWithStringConversion extends core.Object {
111 toString() {
112 return dart.str`(${this.operand1} + ${this.operand2}))`;
113 }
114 }
115 dart.addTypeTests(AdditionWithStringConversion);
116 return AdditionWithStringConversion;
117 });
118 mixin_bound_test.AdditionWithStringConversion = AdditionWithStringConversion() ;
119 mixin_bound_test.SubtractionWithStringConversion$ = dart.generic(E => {
120 class SubtractionWithStringConversion extends core.Object {
121 toString() {
122 return dart.str`(${this.operand1} - ${this.operand2})`;
123 }
124 }
125 dart.addTypeTests(SubtractionWithStringConversion);
126 return SubtractionWithStringConversion;
127 });
128 mixin_bound_test.SubtractionWithStringConversion = SubtractionWithStringConver sion();
129 mixin_bound_test.NumberWithStringConversion = class NumberWithStringConversion extends core.Object {
130 toString() {
131 return dart.toString(this.val);
132 }
133 };
134 mixin_bound_test.MultiplicationWithStringConversion$ = dart.generic(E => {
135 class MultiplicationWithStringConversion extends core.Object {
136 toString() {
137 return dart.str`(${this.operand1} * ${this.operand2})`;
138 }
139 }
140 dart.addTypeTests(MultiplicationWithStringConversion);
141 return MultiplicationWithStringConversion;
142 });
143 mixin_bound_test.MultiplicationWithStringConversion = MultiplicationWithString Conversion();
144 mixin_bound_test.Expression = class Expression extends dart.mixin(mixin_bound_ test.AbstractExpression, mixin_bound_test.ExpressionWithEval, mixin_bound_test.E xpressionWithStringConversion) {
145 new() {
146 super.new();
147 }
148 };
149 mixin_bound_test.Addition = class Addition extends dart.mixin(mixin_bound_test .AbstractAddition$(mixin_bound_test.Expression), mixin_bound_test.AdditionWithEv al$(mixin_bound_test.Expression), mixin_bound_test.AdditionWithStringConversion$ (mixin_bound_test.Expression)) {
150 new(operand1, operand2) {
151 super.new(operand1, operand2);
152 }
153 };
154 mixin_bound_test.Subtraction = class Subtraction extends dart.mixin(mixin_boun d_test.AbstractSubtraction$(mixin_bound_test.Expression), mixin_bound_test.Subtr actionWithEval$(mixin_bound_test.Expression), mixin_bound_test.SubtractionWithSt ringConversion$(mixin_bound_test.Expression)) {
155 new(operand1, operand2) {
156 super.new(operand1, operand2);
157 }
158 };
159 mixin_bound_test.Number = class Number extends dart.mixin(mixin_bound_test.Abs tractNumber, mixin_bound_test.NumberWithEval, mixin_bound_test.NumberWithStringC onversion) {
160 new(val) {
161 super.new(val);
162 }
163 };
164 mixin_bound_test.Multiplication = class Multiplication extends dart.mixin(mixi n_bound_test.AbstractMultiplication$(mixin_bound_test.Expression), mixin_bound_t est.MultiplicationWithEval$(mixin_bound_test.Expression), mixin_bound_test.Multi plicationWithStringConversion$(mixin_bound_test.Expression)) {
165 new(operand1, operand2) {
166 super.new(operand1, operand2);
167 }
168 };
169 mixin_bound_test.main = function() {
170 let e = new mixin_bound_test.Multiplication(new mixin_bound_test.Addition(ne w mixin_bound_test.Number(4), new mixin_bound_test.Number(2)), new mixin_bound_t est.Subtraction(new mixin_bound_test.Number(10), new mixin_bound_test.Number(7)) );
171 expect$.Expect.equals('((4 + 2)) * (10 - 7)) = 18', dart.str`${e} = ${e.eval }`);
172 };
173 dart.fn(mixin_bound_test.main, VoidTovoid());
174 // Exports:
175 exports.mixin_bound_test = mixin_bound_test;
176 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698