OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/list_literal3_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__list_literal3_test(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 list_literal3_test = Object.create(null); |
| 12 let JSArrayOfString = () => (JSArrayOfString = dart.constFn(_interceptors.JSAr
ray$(core.String)))(); |
| 13 let ListOfint = () => (ListOfint = dart.constFn(core.List$(core.int)))(); |
| 14 let ListOfdouble = () => (ListOfdouble = dart.constFn(core.List$(core.double))
)(); |
| 15 let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(da
rt.void, [])))(); |
| 16 let dynamicTobool = () => (dynamicTobool = dart.constFn(dart.definiteFunctionT
ype(core.bool, [dart.dynamic])))(); |
| 17 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 18 let const$; |
| 19 let const$0; |
| 20 let const$1; |
| 21 let const$2; |
| 22 let const$3; |
| 23 let const$4; |
| 24 let const$5; |
| 25 list_literal3_test.ListLiteral3Test = class ListLiteral3Test extends core.Obje
ct { |
| 26 static testMain() { |
| 27 let joke = const$ || (const$ = dart.constList(["knock", "knock"], core.Str
ing)); |
| 28 expect$.Expect.identical(joke, list_literal3_test.ListLiteral3Test.canonic
alJoke); |
| 29 expect$.Expect.identical(joke[dartx.get](0), joke[dartx.get](1)); |
| 30 expect$.Expect.identical(joke[dartx.get](0), list_literal3_test.ListLitera
l3Test.canonicalJoke[dartx.get](0)); |
| 31 expect$.Expect.throws(dart.fn(() => { |
| 32 joke[dartx.set](0, "sock"); |
| 33 }, VoidTovoid()), dart.fn(e => core.UnsupportedError.is(e), dynamicTobool(
))); |
| 34 expect$.Expect.identical(joke[dartx.get](0), joke[dartx.get](1)); |
| 35 let lame_joke = JSArrayOfString().of(["knock", "knock"]); |
| 36 expect$.Expect.identical(joke[dartx.get](1), lame_joke[dartx.get](1)); |
| 37 expect$.Expect.equals(false, core.identical(joke, lame_joke)); |
| 38 lame_joke[dartx.set](1, "who"); |
| 39 expect$.Expect.identical("who", lame_joke[dartx.get](1)); |
| 40 let a = const$2 || (const$2 = dart.constList([const$0 || (const$0 = dart.c
onstList([1, 2], core.int)), const$1 || (const$1 = dart.constList([1, 2], core.i
nt))], ListOfint())); |
| 41 expect$.Expect.identical(a[dartx.get](0), a[dartx.get](1)); |
| 42 expect$.Expect.identical(a[dartx.get](0)[dartx.get](0), a[dartx.get](1)[da
rtx.get](0)); |
| 43 expect$.Expect.throws(dart.fn(() => { |
| 44 a[dartx.get](0)[dartx.set](0, 42); |
| 45 }, VoidTovoid()), dart.fn(e => core.UnsupportedError.is(e), dynamicTobool(
))); |
| 46 let b = const$5 || (const$5 = dart.constList([const$3 || (const$3 = dart.c
onstList([1.0, 2.0], core.double)), const$4 || (const$4 = dart.constList([1.0, 2
.0], core.double))], ListOfdouble())); |
| 47 expect$.Expect.identical(b[dartx.get](0), b[dartx.get](1)); |
| 48 expect$.Expect.equals(true, b[dartx.get](0)[dartx.get](0) == 1.0); |
| 49 expect$.Expect.identical(b[dartx.get](0)[dartx.get](0), b[dartx.get](1)[da
rtx.get](0)); |
| 50 expect$.Expect.throws(dart.fn(() => { |
| 51 b[dartx.get](0)[dartx.set](0, 42.0); |
| 52 }, VoidTovoid()), dart.fn(e => core.UnsupportedError.is(e), dynamicTobool(
))); |
| 53 } |
| 54 }; |
| 55 dart.setSignature(list_literal3_test.ListLiteral3Test, { |
| 56 statics: () => ({testMain: dart.definiteFunctionType(dart.dynamic, [])}), |
| 57 names: ['testMain'] |
| 58 }); |
| 59 list_literal3_test.ListLiteral3Test.canonicalJoke = dart.constList(["knock", "
knock"], core.String); |
| 60 list_literal3_test.main = function() { |
| 61 list_literal3_test.ListLiteral3Test.testMain(); |
| 62 }; |
| 63 dart.fn(list_literal3_test.main, VoidTodynamic()); |
| 64 // Exports: |
| 65 exports.list_literal3_test = list_literal3_test; |
| 66 }); |
OLD | NEW |