| Index: tests/corelib/duration_test.dart
|
| diff --git a/tests/corelib/duration_test.dart b/tests/corelib/duration_test.dart
|
| index 611161549e9310e9c62c0845e46943ffe2d07dcc..306873db87ef2adb7654a70cdc2062c7475f4f5d 100644
|
| --- a/tests/corelib/duration_test.dart
|
| +++ b/tests/corelib/duration_test.dart
|
| @@ -225,4 +225,46 @@ main() {
|
|
|
| d = const Duration(hours: -1999, minutes: -17, seconds: -42);
|
| Expect.equals("-1999:17:42.000000", d.toString());
|
| +
|
| + // Edge conditions for toString of microseconds.
|
| + // Regression test for http://dartbug.com/15678
|
| +
|
| + d = const Duration(microseconds: 1);
|
| + Expect.equals("0:00:00.000001", d.toString());
|
| +
|
| + d = const Duration(microseconds: 9);
|
| + Expect.equals("0:00:00.000009", d.toString());
|
| +
|
| + d = const Duration(microseconds: 10);
|
| + Expect.equals("0:00:00.000010", d.toString());
|
| +
|
| + d = const Duration(microseconds: 99);
|
| + Expect.equals("0:00:00.000099", d.toString());
|
| +
|
| + d = const Duration(microseconds: 100);
|
| + Expect.equals("0:00:00.000100", d.toString());
|
| +
|
| + d = const Duration(microseconds: 999);
|
| + Expect.equals("0:00:00.000999", d.toString());
|
| +
|
| + d = const Duration(microseconds: 1000);
|
| + Expect.equals("0:00:00.001000", d.toString());
|
| +
|
| + d = const Duration(microseconds: 9999);
|
| + Expect.equals("0:00:00.009999", d.toString());
|
| +
|
| + d = const Duration(microseconds: 10000);
|
| + Expect.equals("0:00:00.010000", d.toString());
|
| +
|
| + d = const Duration(microseconds: 99999);
|
| + Expect.equals("0:00:00.099999", d.toString());
|
| +
|
| + d = const Duration(microseconds: 100000);
|
| + Expect.equals("0:00:00.100000", d.toString());
|
| +
|
| + d = const Duration(microseconds: 999999);
|
| + Expect.equals("0:00:00.999999", d.toString());
|
| +
|
| + d = const Duration(microseconds: 1000000);
|
| + Expect.equals("0:00:01.000000", d.toString());
|
| }
|
|
|