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

Side by Side Diff: test/codegen_expected/corelib/expando_test.js

Issue 2211293002: Reify type params on map literals (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Remove unnecessary null check Created 4 years, 4 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
1 dart_library.library('corelib/expando_test', null, /* Imports */[ 1 dart_library.library('corelib/expando_test', null, /* Imports */[
2 'dart_sdk', 2 'dart_sdk',
3 'expect' 3 'expect'
4 ], function load__expando_test(exports, dart_sdk, expect) { 4 ], function load__expando_test(exports, dart_sdk, expect) {
5 'use strict'; 5 'use strict';
6 const core = dart_sdk.core; 6 const core = dart_sdk.core;
7 const _interceptors = dart_sdk._interceptors; 7 const _interceptors = dart_sdk._interceptors;
8 const dart = dart_sdk.dart; 8 const dart = dart_sdk.dart;
9 const dartx = dart_sdk.dartx; 9 const dartx = dart_sdk.dartx;
10 const expect$ = expect.expect; 10 const expect$ = expect.expect;
11 const expando_test = Object.create(null); 11 const expando_test = Object.create(null);
12 let ExpandoOfint = () => (ExpandoOfint = dart.constFn(core.Expando$(core.int)) )(); 12 let ExpandoOfint = () => (ExpandoOfint = dart.constFn(core.Expando$(core.int)) )();
13 let JSArrayOfint = () => (JSArrayOfint = dart.constFn(_interceptors.JSArray$(c ore.int)))(); 13 let JSArrayOfint = () => (JSArrayOfint = dart.constFn(_interceptors.JSArray$(c ore.int)))();
14 let JSArrayOfObject = () => (JSArrayOfObject = dart.constFn(_interceptors.JSAr ray$(core.Object)))(); 14 let JSArrayOfObject = () => (JSArrayOfObject = dart.constFn(_interceptors.JSAr ray$(core.Object)))();
15 let VoidToint = () => (VoidToint = dart.constFn(dart.definiteFunctionType(core .int, [])))(); 15 let VoidToint = () => (VoidToint = dart.constFn(dart.definiteFunctionType(core .int, [])))();
16 let dynamicTobool = () => (dynamicTobool = dart.constFn(dart.definiteFunctionT ype(core.bool, [dart.dynamic])))(); 16 let dynamicTobool = () => (dynamicTobool = dart.constFn(dart.definiteFunctionT ype(core.bool, [dart.dynamic])))();
17 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))(); 17 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))();
18 let const$; 18 let const$;
19 let const$0; 19 let const$0;
20 expando_test.ExpandoTest = class ExpandoTest extends core.Object { 20 expando_test.ExpandoTest = class ExpandoTest extends core.Object {
21 static testMain() { 21 static testMain() {
22 expando_test.ExpandoTest.visits = new (ExpandoOfint())('visits'); 22 expando_test.ExpandoTest.visits = new (ExpandoOfint())('visits');
23 let legal = JSArrayOfObject().of([new core.Object(), core.List.new(), JSAr rayOfint().of([1, 2, 3]), const$ || (const$ = dart.constList([1, 2, 3], core.int )), core.Map.new(), dart.map({x: 1, y: 2}), const$0 || (const$0 = dart.const(dar t.map({x: 1, y: 2}))), new core.Expando(), new core.Expando('horse')]); 23 let legal = JSArrayOfObject().of([new core.Object(), core.List.new(), JSAr rayOfint().of([1, 2, 3]), const$ || (const$ = dart.constList([1, 2, 3], core.int )), core.Map.new(), dart.map({x: 1, y: 2}, core.String, core.int), const$0 || (c onst$0 = dart.const(dart.map({x: 1, y: 2}, core.String, core.int))), new core.Ex pando(), new core.Expando('horse')]);
24 for (let object of legal) { 24 for (let object of legal) {
25 expando_test.ExpandoTest.testNamedExpando(object); 25 expando_test.ExpandoTest.testNamedExpando(object);
26 expando_test.ExpandoTest.testUnnamedExpando(object); 26 expando_test.ExpandoTest.testUnnamedExpando(object);
27 } 27 }
28 for (let object of legal) { 28 for (let object of legal) {
29 expect$.Expect.equals(2, expando_test.ExpandoTest.visits.get(object), da rt.str`${object}`); 29 expect$.Expect.equals(2, expando_test.ExpandoTest.visits.get(object), da rt.str`${object}`);
30 } 30 }
31 expando_test.ExpandoTest.testIllegal(); 31 expando_test.ExpandoTest.testIllegal();
32 expando_test.ExpandoTest.testIdentity(); 32 expando_test.ExpandoTest.testIdentity();
33 } 33 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 ['=='](other) { 117 ['=='](other) {
118 return expando_test.Mutable.is(other) && other.id == this.id; 118 return expando_test.Mutable.is(other) && other.id == this.id;
119 } 119 }
120 }; 120 };
121 dart.setSignature(expando_test.Mutable, { 121 dart.setSignature(expando_test.Mutable, {
122 constructors: () => ({new: dart.definiteFunctionType(expando_test.Mutable, [ core.int])}) 122 constructors: () => ({new: dart.definiteFunctionType(expando_test.Mutable, [ core.int])})
123 }); 123 });
124 // Exports: 124 // Exports:
125 exports.expando_test = expando_test; 125 exports.expando_test = expando_test;
126 }); 126 });
OLDNEW
« no previous file with comments | « test/codegen_expected/corelib/data_uri_test.js ('k') | test/codegen_expected/corelib/json_map_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698