| 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("1e+0", (1.0).toStringAsExponential()); | 9 Expect.equals("1e+0", (1.0).toStringAsExponential()); |
| 8 Expect.equals("1.1e+1", (11.0).toStringAsExponential()); | 10 Expect.equals("1.1e+1", (11.0).toStringAsExponential()); |
| 9 Expect.equals("1.12e+2", (112.0).toStringAsExponential()); | 11 Expect.equals("1.12e+2", (112.0).toStringAsExponential()); |
| 10 Expect.equals("1e+0", (1.0).toStringAsExponential(null)); | 12 Expect.equals("1e+0", (1.0).toStringAsExponential(null)); |
| 11 Expect.equals("1.1e+1", (11.0).toStringAsExponential(null)); | 13 Expect.equals("1.1e+1", (11.0).toStringAsExponential(null)); |
| 12 Expect.equals("1.12e+2", (112.0).toStringAsExponential(null)); | 14 Expect.equals("1.12e+2", (112.0).toStringAsExponential(null)); |
| 13 Expect.equals("1e+0", (1.0).toStringAsExponential(0)); | 15 Expect.equals("1e+0", (1.0).toStringAsExponential(0)); |
| 14 Expect.equals("1e+1", (11.0).toStringAsExponential(0)); | 16 Expect.equals("1e+1", (11.0).toStringAsExponential(0)); |
| 15 Expect.equals("1e+2", (112.0).toStringAsExponential(0)); | 17 Expect.equals("1e+2", (112.0).toStringAsExponential(0)); |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 Expect.equals("0.00e+0", (0.0).toStringAsExponential(2)); | 91 Expect.equals("0.00e+0", (0.0).toStringAsExponential(2)); |
| 90 Expect.equals("1e+1", (11.2356).toStringAsExponential(0)); | 92 Expect.equals("1e+1", (11.2356).toStringAsExponential(0)); |
| 91 Expect.equals("1.1236e+1", (11.2356).toStringAsExponential(4)); | 93 Expect.equals("1.1236e+1", (11.2356).toStringAsExponential(4)); |
| 92 Expect.equals("1.1236e-4", (0.000112356).toStringAsExponential(4)); | 94 Expect.equals("1.1236e-4", (0.000112356).toStringAsExponential(4)); |
| 93 Expect.equals("-1.1236e-4", (-0.000112356).toStringAsExponential(4)); | 95 Expect.equals("-1.1236e-4", (-0.000112356).toStringAsExponential(4)); |
| 94 Expect.equals("1.12356e-4", (0.000112356).toStringAsExponential()); | 96 Expect.equals("1.12356e-4", (0.000112356).toStringAsExponential()); |
| 95 Expect.equals("-1.12356e-4", (-0.000112356).toStringAsExponential()); | 97 Expect.equals("-1.12356e-4", (-0.000112356).toStringAsExponential()); |
| 96 Expect.equals("1.12356e-4", (0.000112356).toStringAsExponential(null)); | 98 Expect.equals("1.12356e-4", (0.000112356).toStringAsExponential(null)); |
| 97 Expect.equals("-1.12356e-4", (-0.000112356).toStringAsExponential(null)); | 99 Expect.equals("-1.12356e-4", (-0.000112356).toStringAsExponential(null)); |
| 98 } | 100 } |
| OLD | NEW |