OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/value_range_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__value_range_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 value_range_test = Object.create(null); |
| 11 let intToint = () => (intToint = dart.constFn(dart.definiteFunctionType(core.i
nt, [core.int])))(); |
| 12 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 13 let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(da
rt.void, [])))(); |
| 14 let dynamicTobool = () => (dynamicTobool = dart.constFn(dart.definiteFunctionT
ype(core.bool, [dart.dynamic])))(); |
| 15 value_range_test.inscrutable = function(x) { |
| 16 return x == 0 ? 0 : (dart.notNull(x) | dart.notNull(value_range_test.inscrut
able((dart.notNull(x) & dart.notNull(x) - 1) >>> 0))) >>> 0; |
| 17 }; |
| 18 dart.fn(value_range_test.inscrutable, intToint()); |
| 19 let const$; |
| 20 value_range_test.foo = function() { |
| 21 let x = 258; |
| 22 if (value_range_test.inscrutable(x) == 0) x = 0; |
| 23 if (value_range_test.inscrutable(10) == 10) x = 16; |
| 24 x = x & 255; |
| 25 let a = const$ || (const$ = dart.constList([1, 2, 3], core.int)); |
| 26 return a[dartx.get](x); |
| 27 }; |
| 28 dart.fn(value_range_test.foo, VoidTodynamic()); |
| 29 value_range_test.main = function() { |
| 30 expect$.Expect.throws(dart.fn(() => value_range_test.foo(), VoidTovoid()), d
art.fn(e => core.RangeError.is(e), dynamicTobool())); |
| 31 }; |
| 32 dart.fn(value_range_test.main, VoidTodynamic()); |
| 33 // Exports: |
| 34 exports.value_range_test = value_range_test; |
| 35 }); |
OLD | NEW |