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

Side by Side Diff: test/codegen_expected/language/ordered_maps_test.js

Issue 2211293002: Reify type params on map literals (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Suppress empty arg with dynamic params 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('language/ordered_maps_test', null, /* Imports */[ 1 dart_library.library('language/ordered_maps_test', null, /* Imports */[
2 'dart_sdk', 2 'dart_sdk',
3 'expect' 3 'expect'
4 ], function load__ordered_maps_test(exports, dart_sdk, expect) { 4 ], function load__ordered_maps_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 dart = dart_sdk.dart; 7 const dart = dart_sdk.dart;
8 const dartx = dart_sdk.dartx; 8 const dartx = dart_sdk.dartx;
9 const expect$ = expect.expect; 9 const expect$ = expect.expect;
10 const ordered_maps_test = Object.create(null); 10 const ordered_maps_test = Object.create(null);
11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))(); 11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))();
12 let const$; 12 let const$;
13 let const$0; 13 let const$0;
14 ordered_maps_test.OrderedMapsTest = class OrderedMapsTest extends core.Object { 14 ordered_maps_test.OrderedMapsTest = class OrderedMapsTest extends core.Object {
15 static testMain() { 15 static testMain() {
16 ordered_maps_test.OrderedMapsTest.testMaps(const$ || (const$ = dart.const( dart.map({a: 1, c: 2}))), const$0 || (const$0 = dart.const(dart.map({c: 2, a: 1} ))), true); 16 ordered_maps_test.OrderedMapsTest.testMaps(const$ || (const$ = dart.const( dart.map({a: 1, c: 2}, core.String, core.int))), const$0 || (const$0 = dart.cons t(dart.map({c: 2, a: 1}, core.String, core.int))), true);
17 ordered_maps_test.OrderedMapsTest.testMaps(dart.map({a: 1, c: 2}), dart.ma p({c: 2, a: 1}), false); 17 ordered_maps_test.OrderedMapsTest.testMaps(dart.map({a: 1, c: 2}, core.Str ing, core.int), dart.map({c: 2, a: 1}, core.String, core.int), false);
18 } 18 }
19 static testMaps(map1, map2, isConst) { 19 static testMaps(map1, map2, isConst) {
20 expect$.Expect.isFalse(core.identical(map1, map2)); 20 expect$.Expect.isFalse(core.identical(map1, map2));
21 let keys = dart.dsend(dart.dload(map1, 'keys'), 'toList'); 21 let keys = dart.dsend(dart.dload(map1, 'keys'), 'toList');
22 expect$.Expect.equals(2, dart.dload(keys, 'length')); 22 expect$.Expect.equals(2, dart.dload(keys, 'length'));
23 expect$.Expect.equals("a", dart.dindex(keys, 0)); 23 expect$.Expect.equals("a", dart.dindex(keys, 0));
24 expect$.Expect.equals("c", dart.dindex(keys, 1)); 24 expect$.Expect.equals("c", dart.dindex(keys, 1));
25 keys = dart.dsend(dart.dload(map2, 'keys'), 'toList'); 25 keys = dart.dsend(dart.dload(map2, 'keys'), 'toList');
26 expect$.Expect.equals(2, dart.dload(keys, 'length')); 26 expect$.Expect.equals(2, dart.dload(keys, 'length'));
27 expect$.Expect.equals("c", dart.dindex(keys, 0)); 27 expect$.Expect.equals("c", dart.dindex(keys, 0));
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 }), 73 }),
74 names: ['testMain', 'testMaps'] 74 names: ['testMain', 'testMaps']
75 }); 75 });
76 ordered_maps_test.main = function() { 76 ordered_maps_test.main = function() {
77 ordered_maps_test.OrderedMapsTest.testMain(); 77 ordered_maps_test.OrderedMapsTest.testMain();
78 }; 78 };
79 dart.fn(ordered_maps_test.main, VoidTodynamic()); 79 dart.fn(ordered_maps_test.main, VoidTodynamic());
80 // Exports: 80 // Exports:
81 exports.ordered_maps_test = ordered_maps_test; 81 exports.ordered_maps_test = ordered_maps_test;
82 }); 82 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698