OLD | NEW |
1 dart_library.library('language/mint_arithmetic_test', null, /* Imports */[ | 1 dart_library.library('language/mint_arithmetic_test', null, /* Imports */[ |
2 'dart_sdk', | 2 'dart_sdk', |
3 'expect' | 3 'expect' |
4 ], function load__mint_arithmetic_test(exports, dart_sdk, expect) { | 4 ], function load__mint_arithmetic_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 mint_arithmetic_test = Object.create(null); | 10 const mint_arithmetic_test = Object.create(null); |
| 11 let dynamicAnddynamicTobool = () => (dynamicAnddynamicTobool = dart.constFn(da
rt.definiteFunctionType(core.bool, [dart.dynamic, dart.dynamic])))(); |
| 12 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
11 let dynamicAnddynamicTodynamic = () => (dynamicAnddynamicTodynamic = dart.cons
tFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic, dart.dynamic])))(); | 13 let dynamicAnddynamicTodynamic = () => (dynamicAnddynamicTodynamic = dart.cons
tFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic, dart.dynamic])))(); |
12 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); | |
13 mint_arithmetic_test.test_and_1 = function() { | 14 mint_arithmetic_test.test_and_1 = function() { |
14 try { | 15 try { |
15 function f(a, b) { | 16 function f(a, b) { |
16 let s = b; | 17 let s = b; |
17 let t = dart.dsend(a, '&', s); | 18 let t = dart.dsend(a, '&', s); |
18 return dart.equals(t, b); | 19 return dart.equals(t, b); |
19 } | 20 } |
20 dart.fn(f, dynamicAnddynamicTodynamic()); | 21 dart.fn(f, dynamicAnddynamicTobool()); |
21 let x = 4294967295; | 22 let x = 4294967295; |
22 for (let i = 0; i < 20; i++) | 23 for (let i = 0; i < 20; i++) |
23 f(x, 0); | 24 f(x, 0); |
24 expect$.Expect.equals(true, f(x, 0)); | 25 expect$.Expect.equals(true, f(x, 0)); |
25 expect$.Expect.equals(false, f(x, -1)); | 26 expect$.Expect.equals(false, f(x, -1)); |
26 } finally { | 27 } finally { |
27 } | 28 } |
28 }; | 29 }; |
29 dart.fn(mint_arithmetic_test.test_and_1, VoidTodynamic()); | 30 dart.fn(mint_arithmetic_test.test_and_1, VoidTodynamic()); |
30 mint_arithmetic_test.test_and_2 = function() { | 31 mint_arithmetic_test.test_and_2 = function() { |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 mint_arithmetic_test.test_and_2(); | 101 mint_arithmetic_test.test_and_2(); |
101 mint_arithmetic_test.test_xor_1(); | 102 mint_arithmetic_test.test_xor_1(); |
102 mint_arithmetic_test.test_or_1(); | 103 mint_arithmetic_test.test_or_1(); |
103 mint_arithmetic_test.test_mint_double_op(); | 104 mint_arithmetic_test.test_mint_double_op(); |
104 } | 105 } |
105 }; | 106 }; |
106 dart.fn(mint_arithmetic_test.main, VoidTodynamic()); | 107 dart.fn(mint_arithmetic_test.main, VoidTodynamic()); |
107 // Exports: | 108 // Exports: |
108 exports.mint_arithmetic_test = mint_arithmetic_test; | 109 exports.mint_arithmetic_test = mint_arithmetic_test; |
109 }); | 110 }); |
OLD | NEW |