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 65461e2e069bb8a125d61804ee60508591fe6e51..111b60f0fb71ec833f518b2063b4e53ef1c565ad 100644 |
| --- a/pkg/intl/test/date_time_format_test_core.dart |
| +++ b/pkg/intl/test/date_time_format_test_core.dart |
| @@ -14,6 +14,7 @@ import 'package:unittest/unittest.dart'; |
| import 'date_time_format_test_data.dart'; |
| import 'package:intl/intl.dart'; |
| import 'package:intl/src/date_format_internal.dart'; |
| +import 'package:intl/src/temporary_debugging.dart'; |
| var formatsToTest = const [ |
| DateFormat.DAY, |
| @@ -164,7 +165,8 @@ testRoundTripParsing(String localeName, DateTime date) { |
| if (!badSkeletons.any((x) => x == skeleton)) { |
| var format = new DateFormat(skeleton, localeName); |
| var actualResult = format.format(date); |
| - var parsed = format.parse(actualResult); |
| + logDateCreation = true; |
| + var parsed = format.parse("actualResult"); |
|
kustermann
2013/12/18 08:44:50
Was this quoting an accident?
Alan Knight
2013/12/18 17:49:17
Oops, thanks. Done.
|
| var thenPrintAgain = format.format(parsed); |
| // We've seen a case where this failed in a way that seemed like a time |
| // zone shifting or some other strange behaviour that caused an off by |
| @@ -172,11 +174,18 @@ testRoundTripParsing(String localeName, DateTime date) { |
| // as possible if it occurs again. |
| if (thenPrintAgain != actualResult) { |
| print("Date mismatch!"); |
| + print("Date creation log: $dateCreationLog"); |
| + dateCreationLog.clear(); |
| print(" Expected $actualResult"); |
| print(" Got $thenPrintAgain"); |
| print(" Original date = $date"); |
| print(" Original ms = ${date.millisecondsSinceEpoch}"); |
| print(" Parsed back to $parsed"); |
| + logDateCreation = true; |
|
kustermann
2013/12/18 08:44:50
This is already set on line 168 and unset on line
Alan Knight
2013/12/18 17:49:17
Done.
|
| + var parsed2 = format.parse(actualResult); |
| + print(" Parsing again yields $parsed2"); |
| + print(" Logged as: $dateCreationLog"); |
| + dateCreationLog.clear(); |
| print(" Parsed ms = ${parsed.millisecondsSinceEpoch}"); |
| print(" Original tz = $originalTimeZoneOffset"); |
| print(" Current tz name = $originalTimeZoneName"); |
| @@ -185,6 +194,7 @@ testRoundTripParsing(String localeName, DateTime date) { |
| print(" Start time = $originalTime"); |
| print(" Current time ${new DateTime.now()}"); |
| } |
| + logDateCreation = false; |
| expect(thenPrintAgain, equals(actualResult)); |
| } |
| } |