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

Side by Side Diff: test/codegen/expect/language/cast_test_07_multi.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/cast_test_07_multi', null, /* Imports */[
2 'dart_sdk',
3 'expect'
4 ], function load__cast_test_07_multi(exports, dart_sdk, expect) {
5 'use strict';
6 const core = dart_sdk.core;
7 const _interceptors = dart_sdk._interceptors;
8 const dart = dart_sdk.dart;
9 const dartx = dart_sdk.dartx;
10 const expect$ = expect.expect;
11 const cast_test_07_multi = Object.create(null);
12 let JSArrayOfint = () => (JSArrayOfint = dart.constFn(_interceptors.JSArray$(c ore.int)))();
13 let ListOfint = () => (ListOfint = dart.constFn(core.List$(core.int)))();
14 let VoidToObject = () => (VoidToObject = dart.constFn(dart.definiteFunctionTyp e(core.Object, [])))();
15 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))();
16 cast_test_07_multi.C = class C extends core.Object {
17 new() {
18 this.foo = 42;
19 }
20 };
21 cast_test_07_multi.D = class D extends cast_test_07_multi.C {
22 new() {
23 this.bar = 37;
24 super.new();
25 }
26 };
27 cast_test_07_multi.createC = function() {
28 return new cast_test_07_multi.C();
29 };
30 dart.fn(cast_test_07_multi.createC, VoidToObject());
31 cast_test_07_multi.createD = function() {
32 return new cast_test_07_multi.D();
33 };
34 dart.fn(cast_test_07_multi.createD, VoidToObject());
35 cast_test_07_multi.getNull = function() {
36 return null;
37 };
38 dart.fn(cast_test_07_multi.getNull, VoidToObject());
39 cast_test_07_multi.createList = function() {
40 return JSArrayOfint().of([2]);
41 };
42 dart.fn(cast_test_07_multi.createList, VoidToObject());
43 cast_test_07_multi.createInt = function() {
44 return 87;
45 };
46 dart.fn(cast_test_07_multi.createInt, VoidToObject());
47 cast_test_07_multi.createString = function() {
48 return "a string";
49 };
50 dart.fn(cast_test_07_multi.createString, VoidToObject());
51 cast_test_07_multi.main = function() {
52 let oc = cast_test_07_multi.createC();
53 let od = cast_test_07_multi.createD();
54 let on = cast_test_07_multi.getNull();
55 let ol = cast_test_07_multi.createList();
56 let oi = cast_test_07_multi.createInt();
57 let os = cast_test_07_multi.createString();
58 expect$.Expect.equals(42, cast_test_07_multi.C.as(oc).foo);
59 expect$.Expect.equals(42, cast_test_07_multi.C.as(od).foo);
60 expect$.Expect.equals(42, cast_test_07_multi.D.as(od).foo);
61 expect$.Expect.equals(37, cast_test_07_multi.D.as(od).bar);
62 expect$.Expect.equals(37, cast_test_07_multi.D.as(cast_test_07_multi.C.as(od )).bar);
63 dart.toString(cast_test_07_multi.D.as(on));
64 dart.toString(on);
65 dart.toString(oc);
66 dart.toString(od);
67 dart.toString(on);
68 dart.dload(on, 'foo');
69 dart.dload(oc, 'foo');
70 dart.dload(od, 'foo');
71 dart.dload(od, 'bar');
72 let c = cast_test_07_multi.C.as(oc);
73 c = cast_test_07_multi.C.as(od);
74 c = cast_test_07_multi.C._check(oc);
75 let d = cast_test_07_multi.D.as(od);
76 d = cast_test_07_multi.D._check(od);
77 core.List.as(ol)[dartx.get](0);
78 ListOfint().as(ol)[dartx.get](0);
79 dart.dindex(ol, 0);
80 let x = ListOfint().as(ol)[dartx.get](0);
81 ListOfint().as(ol)[dartx.set](0, core.int.as(oi));
82 core.String.as(os)[dartx.length];
83 dart.dload(os, 'length');
84 dart.notNull(core.int.as(oi)) + 2;
85 };
86 dart.fn(cast_test_07_multi.main, VoidTodynamic());
87 // Exports:
88 exports.cast_test_07_multi = cast_test_07_multi;
89 });
OLDNEW
« no previous file with comments | « test/codegen/expect/language/cast_test_05_multi.js ('k') | test/codegen/expect/language/cast_test_08_multi.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698