Index: tests/language/double_to_string_as_exponential_test.dart |
diff --git a/tests/language/double_to_string_as_exponential_test.dart b/tests/language/double_to_string_as_exponential_test.dart |
index 3d9b14005e9ba965ab7d62a0f89bf936ca3e0e6d..9827109ca3aad8cf7ea6896c1233f1354eee47b0 100644 |
--- a/tests/language/double_to_string_as_exponential_test.dart |
+++ b/tests/language/double_to_string_as_exponential_test.dart |
@@ -4,6 +4,9 @@ |
// Test basic integer operations. |
main() { |
+ Expect.equals("1e+0", (1.0).toStringAsExponential()); |
+ Expect.equals("1.1e+1", (11.0).toStringAsExponential()); |
+ Expect.equals("1.12e+2", (112.0).toStringAsExponential()); |
Expect.equals("1e+0", (1.0).toStringAsExponential(null)); |
Expect.equals("1.1e+1", (11.0).toStringAsExponential(null)); |
Expect.equals("1.12e+2", (112.0).toStringAsExponential(null)); |
@@ -19,6 +22,9 @@ main() { |
Expect.equals("1.000e+0", (1.0).toStringAsExponential(3)); |
Expect.equals("1.100e+1", (11.0).toStringAsExponential(3)); |
Expect.equals("1.120e+2", (112.0).toStringAsExponential(3)); |
+ Expect.equals("1e-1", (0.1).toStringAsExponential()); |
+ Expect.equals("1.1e-1", (0.11).toStringAsExponential()); |
+ Expect.equals("1.12e-1", (0.112).toStringAsExponential()); |
Expect.equals("1e-1", (0.1).toStringAsExponential(null)); |
Expect.equals("1.1e-1", (0.11).toStringAsExponential(null)); |
Expect.equals("1.12e-1", (0.112).toStringAsExponential(null)); |
@@ -35,6 +41,10 @@ main() { |
Expect.equals("1.100e-1", (0.11).toStringAsExponential(3)); |
Expect.equals("1.120e-1", (0.112).toStringAsExponential(3)); |
+ Expect.equals("-0e+0", (-0.0).toStringAsExponential()); |
+ Expect.equals("-1e+0", (-1.0).toStringAsExponential()); |
+ Expect.equals("-1.1e+1", (-11.0).toStringAsExponential()); |
+ Expect.equals("-1.12e+2", (-112.0).toStringAsExponential()); |
Expect.equals("-0e+0", (-0.0).toStringAsExponential(null)); |
Expect.equals("-1e+0", (-1.0).toStringAsExponential(null)); |
Expect.equals("-1.1e+1", (-11.0).toStringAsExponential(null)); |
@@ -51,6 +61,9 @@ main() { |
Expect.equals("-1.000e+0", (-1.0).toStringAsExponential(3)); |
Expect.equals("-1.100e+1", (-11.0).toStringAsExponential(3)); |
Expect.equals("-1.120e+2", (-112.0).toStringAsExponential(3)); |
+ Expect.equals("-1e-1", (-0.1).toStringAsExponential()); |
+ Expect.equals("-1.1e-1", (-0.11).toStringAsExponential()); |
+ Expect.equals("-1.12e-1", (-0.112).toStringAsExponential()); |
Expect.equals("-1e-1", (-0.1).toStringAsExponential(null)); |
Expect.equals("-1.1e-1", (-0.11).toStringAsExponential(null)); |
Expect.equals("-1.12e-1", (-0.112).toStringAsExponential(null)); |
@@ -71,12 +84,15 @@ main() { |
Expect.equals("Infinity", (double.INFINITY).toStringAsExponential(2)); |
Expect.equals("-Infinity", (-double.INFINITY).toStringAsExponential(2)); |
Expect.equals("1e+0", (1.0).toStringAsExponential(0)); |
+ Expect.equals("0e+0", (0.0).toStringAsExponential()); |
Expect.equals("0e+0", (0.0).toStringAsExponential(null)); |
Expect.equals("0.00e+0", (0.0).toStringAsExponential(2)); |
Expect.equals("1e+1", (11.2356).toStringAsExponential(0)); |
Expect.equals("1.1236e+1", (11.2356).toStringAsExponential(4)); |
Expect.equals("1.1236e-4", (0.000112356).toStringAsExponential(4)); |
Expect.equals("-1.1236e-4", (-0.000112356).toStringAsExponential(4)); |
+ Expect.equals("1.12356e-4", (0.000112356).toStringAsExponential()); |
+ Expect.equals("-1.12356e-4", (-0.000112356).toStringAsExponential()); |
Expect.equals("1.12356e-4", (0.000112356).toStringAsExponential(null)); |
Expect.equals("-1.12356e-4", (-0.000112356).toStringAsExponential(null)); |
} |