Index: tests/language_strong/double_to_string_as_fixed_test.dart |
diff --git a/tests/language_strong/double_to_string_as_fixed_test.dart b/tests/language_strong/double_to_string_as_fixed_test.dart |
index bc15175ae81bbaeec149fe2ca34ee57be64fc500..6e0aed242147916cefb1ca0bc75ed470d3cfc607 100644 |
--- a/tests/language_strong/double_to_string_as_fixed_test.dart |
+++ b/tests/language_strong/double_to_string_as_fixed_test.dart |
@@ -13,9 +13,10 @@ class ToStringAsFixedTest { |
Expect.equals("2.123", 2.123.toStringAsFixed(3)); |
Expect.equals("2.124", 2.1239.toStringAsFixed(3)); |
Expect.equals("NaN", (0.0 / 0.0).toStringAsFixed(3)); |
- Expect.equals("Infinity", (1.0/0.0).toStringAsFixed(3)); |
- Expect.equals("-Infinity", (-1.0/0.0).toStringAsFixed(3)); |
- Expect.equals("1.1111111111111111e+21", 1111111111111111111111.0.toStringAsFixed(8)); |
+ Expect.equals("Infinity", (1.0 / 0.0).toStringAsFixed(3)); |
+ Expect.equals("-Infinity", (-1.0 / 0.0).toStringAsFixed(3)); |
+ Expect.equals( |
+ "1.1111111111111111e+21", 1111111111111111111111.0.toStringAsFixed(8)); |
Expect.equals("0.1", 0.1.toStringAsFixed(1)); |
Expect.equals("0.10", 0.1.toStringAsFixed(2)); |
Expect.equals("0.100", 0.1.toStringAsFixed(3)); |
@@ -68,18 +69,26 @@ class ToStringAsFixedTest { |
Expect.equals("1000", 1000.0.toStringAsFixed(0)); |
Expect.equals("0", 0.00001.toStringAsFixed(0)); |
Expect.equals("0.00001", 0.00001.toStringAsFixed(5)); |
- Expect.equals("0.00000000000000000010", 0.0000000000000000001.toStringAsFixed(20)); |
+ Expect.equals( |
+ "0.00000000000000000010", 0.0000000000000000001.toStringAsFixed(20)); |
Expect.equals("0.00001000000000000", 0.00001.toStringAsFixed(17)); |
Expect.equals("1.00000000000000000", 1.0.toStringAsFixed(17)); |
- Expect.equals("1000000000000000128", 1000000000000000128.0.toStringAsFixed(0)); |
- Expect.equals("100000000000000128.0", 100000000000000128.0.toStringAsFixed(1)); |
- Expect.equals("10000000000000128.00", 10000000000000128.0.toStringAsFixed(2)); |
- Expect.equals("10000000000000128.00000000000000000000", 10000000000000128.0.toStringAsFixed(20)); |
+ Expect.equals( |
+ "1000000000000000128", 1000000000000000128.0.toStringAsFixed(0)); |
+ Expect.equals( |
+ "100000000000000128.0", 100000000000000128.0.toStringAsFixed(1)); |
+ Expect.equals( |
+ "10000000000000128.00", 10000000000000128.0.toStringAsFixed(2)); |
+ Expect.equals("10000000000000128.00000000000000000000", |
+ 10000000000000128.0.toStringAsFixed(20)); |
Expect.equals("0", 0.0.toStringAsFixed(0)); |
Expect.equals("-42.000", (-42.0).toStringAsFixed(3)); |
- Expect.equals("-1000000000000000128", (-1000000000000000128.0).toStringAsFixed(0)); |
- Expect.equals("-0.00000000000000000010", (-0.0000000000000000001).toStringAsFixed(20)); |
- Expect.equals("0.12312312312312299889", 0.123123123123123.toStringAsFixed(20)); |
+ Expect.equals( |
+ "-1000000000000000128", (-1000000000000000128.0).toStringAsFixed(0)); |
+ Expect.equals("-0.00000000000000000010", |
+ (-0.0000000000000000001).toStringAsFixed(20)); |
+ Expect.equals( |
+ "0.12312312312312299889", 0.123123123123123.toStringAsFixed(20)); |
// Test that we round up even when the last digit generated is even. |
// dtoa does not do this in its original form. |
Expect.equals("1", 0.5.toStringAsFixed(0)); |
@@ -90,7 +99,6 @@ class ToStringAsFixedTest { |
} |
} |
- |
main() { |
ToStringAsFixedTest.testMain(); |
} |