OLD | NEW |
(Empty) | |
| 1 dart_library.library('corelib/map_keys2_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__map_keys2_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 map_keys2_test = Object.create(null); |
| 11 let MapOfString$int = () => (MapOfString$int = dart.constFn(core.Map$(core.Str
ing, core.int)))(); |
| 12 let MapOfString$bool = () => (MapOfString$bool = dart.constFn(core.Map$(core.S
tring, core.bool)))(); |
| 13 let IterableOfString = () => (IterableOfString = dart.constFn(core.Iterable$(c
ore.String)))(); |
| 14 let IterableOfbool = () => (IterableOfbool = dart.constFn(core.Iterable$(core.
bool)))(); |
| 15 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 16 let const$; |
| 17 let const$0; |
| 18 map_keys2_test.main = function() { |
| 19 let map1 = dart.map({foo: 42, bar: 499}); |
| 20 let map2 = dart.map(); |
| 21 let map3 = const$ || (const$ = dart.const(dart.map({foo: 42, bar: 499}))); |
| 22 let map4 = const$0 || (const$0 = dart.const(dart.map())); |
| 23 let map5 = MapOfString$int().new(); |
| 24 map5[dartx.set]("foo", 43); |
| 25 map5[dartx.set]("bar", 500); |
| 26 let map6 = MapOfString$bool().new(); |
| 27 expect$.Expect.isTrue(IterableOfString().is(map1[dartx.keys])); |
| 28 expect$.Expect.isTrue(IterableOfbool().is(map1[dartx.keys])); |
| 29 expect$.Expect.isTrue(IterableOfString().is(map2[dartx.keys])); |
| 30 expect$.Expect.isTrue(IterableOfbool().is(map2[dartx.keys])); |
| 31 expect$.Expect.isTrue(IterableOfString().is(map3[dartx.keys])); |
| 32 expect$.Expect.isTrue(IterableOfbool().is(map3[dartx.keys])); |
| 33 expect$.Expect.isTrue(IterableOfString().is(map4[dartx.keys])); |
| 34 expect$.Expect.isTrue(IterableOfbool().is(map4[dartx.keys])); |
| 35 expect$.Expect.isTrue(IterableOfString().is(map5[dartx.keys])); |
| 36 expect$.Expect.isFalse(IterableOfbool().is(map5[dartx.keys])); |
| 37 expect$.Expect.isTrue(IterableOfString().is(map6[dartx.keys])); |
| 38 expect$.Expect.isFalse(IterableOfbool().is(map6[dartx.keys])); |
| 39 }; |
| 40 dart.fn(map_keys2_test.main, VoidTodynamic()); |
| 41 // Exports: |
| 42 exports.map_keys2_test = map_keys2_test; |
| 43 }); |
OLD | NEW |