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 main() { | 6 main() { |
7 Expect.equals("1e+0", (1.0).toStringAsExponential(null)); | 7 Expect.equals("1e+0", (1.0).toStringAsExponential(null)); |
8 Expect.equals("1.1e+1", (11.0).toStringAsExponential(null)); | 8 Expect.equals("1.1e+1", (11.0).toStringAsExponential(null)); |
9 Expect.equals("1.12e+2", (112.0).toStringAsExponential(null)); | 9 Expect.equals("1.12e+2", (112.0).toStringAsExponential(null)); |
10 Expect.equals("1e+0", (1.0).toStringAsExponential(0)); | 10 Expect.equals("1e+0", (1.0).toStringAsExponential(0)); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 Expect.equals("1e+0", (1.0).toStringAsExponential(0)); | 73 Expect.equals("1e+0", (1.0).toStringAsExponential(0)); |
74 Expect.equals("0e+0", (0.0).toStringAsExponential(null)); | 74 Expect.equals("0e+0", (0.0).toStringAsExponential(null)); |
75 Expect.equals("0.00e+0", (0.0).toStringAsExponential(2)); | 75 Expect.equals("0.00e+0", (0.0).toStringAsExponential(2)); |
76 Expect.equals("1e+1", (11.2356).toStringAsExponential(0)); | 76 Expect.equals("1e+1", (11.2356).toStringAsExponential(0)); |
77 Expect.equals("1.1236e+1", (11.2356).toStringAsExponential(4)); | 77 Expect.equals("1.1236e+1", (11.2356).toStringAsExponential(4)); |
78 Expect.equals("1.1236e-4", (0.000112356).toStringAsExponential(4)); | 78 Expect.equals("1.1236e-4", (0.000112356).toStringAsExponential(4)); |
79 Expect.equals("-1.1236e-4", (-0.000112356).toStringAsExponential(4)); | 79 Expect.equals("-1.1236e-4", (-0.000112356).toStringAsExponential(4)); |
80 Expect.equals("1.12356e-4", (0.000112356).toStringAsExponential(null)); | 80 Expect.equals("1.12356e-4", (0.000112356).toStringAsExponential(null)); |
81 Expect.equals("-1.12356e-4", (-0.000112356).toStringAsExponential(null)); | 81 Expect.equals("-1.12356e-4", (-0.000112356).toStringAsExponential(null)); |
82 } | 82 } |
OLD | NEW |