OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 // Testing Bigints with and without intrinsics. | 5 // Testing Bigints with and without intrinsics. |
6 // VMOptions= | 6 // VMOptions= |
7 // VMOptions=--no_intrinsify | 7 // VMOptions=--no_intrinsify |
| 8 // VMOptions=--no-background-compilation |
8 // VMOptions=--optimization_counter_threshold=10 --no-background_compilation | 9 // VMOptions=--optimization_counter_threshold=10 --no-background_compilation |
9 | 10 |
10 library big_integer_test; | 11 library big_integer_test; |
11 import "package:expect/expect.dart"; | 12 import "package:expect/expect.dart"; |
12 | 13 |
13 foo() => 1234567890123456789; | 14 foo() => 1234567890123456789; |
14 bar() => 12345678901234567890; | 15 bar() => 12345678901234567890; |
15 | 16 |
16 testSmiOverflow() { | 17 testSmiOverflow() { |
17 var a = 1073741823; | 18 var a = 1073741823; |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 testBigintNegate(); /// negate: ok | 435 testBigintNegate(); /// negate: ok |
435 testShiftAmount(); /// shift: ok | 436 testShiftAmount(); /// shift: ok |
436 Expect.equals(12345678901234567890, (12345678901234567890).abs()); | 437 Expect.equals(12345678901234567890, (12345678901234567890).abs()); |
437 Expect.equals(12345678901234567890, (-12345678901234567890).abs()); | 438 Expect.equals(12345678901234567890, (-12345678901234567890).abs()); |
438 var a = 10000000000000000000; | 439 var a = 10000000000000000000; |
439 var b = 10000000000000000001; | 440 var b = 10000000000000000001; |
440 Expect.equals(false, a.hashCode == b.hashCode); | 441 Expect.equals(false, a.hashCode == b.hashCode); |
441 Expect.equals(true, a.hashCode == (b - 1).hashCode); | 442 Expect.equals(true, a.hashCode == (b - 1).hashCode); |
442 } | 443 } |
443 } | 444 } |
OLD | NEW |