Chromium Code Reviews| Index: pkg/intl/test/date_time_format_test_core.dart |
| diff --git a/pkg/intl/test/date_time_format_test_core.dart b/pkg/intl/test/date_time_format_test_core.dart |
| index 5d3909010c079e1c5fbd7180ec4e120ada6d99b1..65461e2e069bb8a125d61804ee60508591fe6e51 100644 |
| --- a/pkg/intl/test/date_time_format_test_core.dart |
| +++ b/pkg/intl/test/date_time_format_test_core.dart |
| @@ -423,4 +423,18 @@ void runDateTests(Function subsetFunc) { |
| var aDate = new DateTime(2012, 4, 27, 13, 58, 59, 012); |
| expect(f.format(aDate), "118"); |
| }); |
| + |
| + // There are some very odd off-by-one bugs when parsing dates. Put in |
| + // some very basic tests to try and get more information. |
| + test('Simple Date Creation', () { |
| + var format = new DateFormat(DateFormat.NUM_MONTH); |
| + var first = format.parse("7"); |
| + var second = format.parse("7"); |
| + var basic = new DateTime(1970, 7); |
| + var basicAgain = new DateTime(1970, 7); |
| + expect(first, second); |
| + expect(first, basic); |
| + expect(basic, basicAgain); |
| + expect(first.month, 7); |
|
kustermann
2013/12/10 07:12:22
I would do it in a loop, to increase the probabili
|
| + }); |
| } |