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

Side by Side Diff: test/codegen/expect/language/function_propagation_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/function_propagation_test', null, /* Imports */[
2 'dart_sdk',
3 'expect'
4 ], function load__function_propagation_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 function_propagation_test = Object.create(null);
11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))();
12 function_propagation_test.A = dart.callableClass(function A(...args) {
13 const self = this;
14 function call(...args) {
15 return self.call.apply(self, args);
16 }
17 call.__proto__ = this.__proto__;
18 call.new.apply(call, args);
19 return call;
20 }, class A extends core.Object {
21 call(str) {
22 return 499;
23 }
24 });
25 dart.setSignature(function_propagation_test.A, {
26 methods: () => ({call: dart.definiteFunctionType(core.int, [core.String])})
27 });
28 function_propagation_test.F = dart.typedef('F', () => dart.functionType(core.i nt, [core.String]));
29 function_propagation_test.main = function() {
30 let a = new function_propagation_test.A();
31 if (core.Function.is(a)) {
32 expect$.Expect.isTrue(function_propagation_test.A.is(a));
33 } else {
34 expect$.Expect.fail("a should be a Function");
35 }
36 let a2 = new function_propagation_test.A();
37 if (function_propagation_test.F.is(a2)) {
38 expect$.Expect.isTrue(function_propagation_test.A.is(a2));
39 } else {
40 expect$.Expect.fail("a2 should be an F");
41 }
42 let a3 = new function_propagation_test.A();
43 expect$.Expect.isTrue(function_propagation_test.A.is(a3));
44 let a4 = new function_propagation_test.A();
45 expect$.Expect.isTrue(function_propagation_test.A.is(a4));
46 };
47 dart.fn(function_propagation_test.main, VoidTodynamic());
48 // Exports:
49 exports.function_propagation_test = function_propagation_test;
50 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698