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 // Test basic integer operations. | 4 // Test basic integer operations. |
5 | 5 |
| 6 import "package:expect/expect.dart"; |
| 7 |
6 main() { | 8 main() { |
7 Expect.equals("NaN", (double.NAN).toString()); | 9 Expect.equals("NaN", (double.NAN).toString()); |
8 Expect.equals("Infinity", (1/0).toString()); | 10 Expect.equals("Infinity", (1/0).toString()); |
9 Expect.equals("-Infinity", (-1/0).toString()); | 11 Expect.equals("-Infinity", (-1/0).toString()); |
10 Expect.equals("90.12", (90.12).toString()); | 12 Expect.equals("90.12", (90.12).toString()); |
11 Expect.equals("0.1", (0.1).toString()); | 13 Expect.equals("0.1", (0.1).toString()); |
12 Expect.equals("0.01", (0.01).toString()); | 14 Expect.equals("0.01", (0.01).toString()); |
13 Expect.equals("0.0123", (0.0123).toString()); | 15 Expect.equals("0.0123", (0.0123).toString()); |
14 Expect.equals("1.1111111111111111e+21", | 16 Expect.equals("1.1111111111111111e+21", |
15 (1111111111111111111111.0).toString()); | 17 (1111111111111111111111.0).toString()); |
(...skipping 29 matching lines...) Expand all Loading... |
45 Expect.equals("0.00001", (0.00001).toString()); | 47 Expect.equals("0.00001", (0.00001).toString()); |
46 Expect.equals("1e+21", (1000000000000000012800.0).toString()); | 48 Expect.equals("1e+21", (1000000000000000012800.0).toString()); |
47 Expect.equals("-1e+21", (-1000000000000000012800.0).toString()); | 49 Expect.equals("-1e+21", (-1000000000000000012800.0).toString()); |
48 Expect.equals("1e-7", (0.0000001).toString()); | 50 Expect.equals("1e-7", (0.0000001).toString()); |
49 Expect.equals("-1e-7", (-0.0000001).toString()); | 51 Expect.equals("-1e-7", (-0.0000001).toString()); |
50 Expect.equals("1.0000000000000001e+21", | 52 Expect.equals("1.0000000000000001e+21", |
51 (1000000000000000128000.0).toString()); | 53 (1000000000000000128000.0).toString()); |
52 Expect.equals("0.000001", (0.000001).toString()); | 54 Expect.equals("0.000001", (0.000001).toString()); |
53 Expect.equals("1e-7", (0.0000001).toString()); | 55 Expect.equals("1e-7", (0.0000001).toString()); |
54 } | 56 } |
OLD | NEW |