OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/is_nan_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__is_nan_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 is_nan_test = Object.create(null); |
| 11 let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(da
rt.void, [])))(); |
| 12 let dynamicTobool = () => (dynamicTobool = dart.constFn(dart.definiteFunctionT
ype(core.bool, [dart.dynamic])))(); |
| 13 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 14 let dynamicTodynamic = () => (dynamicTodynamic = dart.constFn(dart.definiteFun
ctionType(dart.dynamic, [dart.dynamic])))(); |
| 15 is_nan_test.A = class A extends core.Object { |
| 16 get isNaN() { |
| 17 return false; |
| 18 } |
| 19 }; |
| 20 is_nan_test.main = function() { |
| 21 expect$.Expect.isTrue(is_nan_test.foo(core.double.NAN)); |
| 22 expect$.Expect.isFalse(is_nan_test.foo(new is_nan_test.A())); |
| 23 expect$.Expect.throws(dart.fn(() => is_nan_test.foo('bar'), VoidTovoid()), d
art.fn(e => core.NoSuchMethodError.is(e), dynamicTobool())); |
| 24 }; |
| 25 dart.fn(is_nan_test.main, VoidTodynamic()); |
| 26 is_nan_test.foo = function(a) { |
| 27 return dart.dload(a, 'isNaN'); |
| 28 }; |
| 29 dart.fn(is_nan_test.foo, dynamicTodynamic()); |
| 30 // Exports: |
| 31 exports.is_nan_test = is_nan_test; |
| 32 }); |
OLD | NEW |