| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 library Int32test; | 5 library Int32test; |
| 6 | 6 |
| 7 import 'package:fixnum/fixnum.dart'; | 7 import 'package:fixnum/fixnum.dart'; |
| 8 import 'package:unittest/unittest.dart'; | 8 import 'package:test/test.dart'; |
| 9 | 9 |
| 10 void main() { | 10 void main() { |
| 11 group("isX tests", () { | 11 group("isX tests", () { |
| 12 test("isEven", () { | 12 test("isEven", () { |
| 13 expect((-Int32.ONE).isEven, false); | 13 expect((-Int32.ONE).isEven, false); |
| 14 expect(Int32.ZERO.isEven, true); | 14 expect(Int32.ZERO.isEven, true); |
| 15 expect(Int32.ONE.isEven, false); | 15 expect(Int32.ONE.isEven, false); |
| 16 expect(Int32.TWO.isEven, true); | 16 expect(Int32.TWO.isEven, true); |
| 17 }); | 17 }); |
| 18 test("isMaxValue", () { | 18 test("isMaxValue", () { |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 expect(new Int32(-1).shiftRightUnsigned(8).toHexString(), "ffffff"); | 418 expect(new Int32(-1).shiftRightUnsigned(8).toHexString(), "ffffff"); |
| 419 }); | 419 }); |
| 420 }); | 420 }); |
| 421 | 421 |
| 422 group("toRadixString", () { | 422 group("toRadixString", () { |
| 423 test("returns base n string representation", () { | 423 test("returns base n string representation", () { |
| 424 expect(new Int32(123456789).toRadixString(5), "223101104124"); | 424 expect(new Int32(123456789).toRadixString(5), "223101104124"); |
| 425 }); | 425 }); |
| 426 }); | 426 }); |
| 427 } | 427 } |
| OLD | NEW |