Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Unified Diff: pkg/intl/test/date_time_format_test_core.dart

Issue 399973002: Work around DateTime creation flakiness (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Clarify TODO Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6ac9d75af3c24e0f4a556da239785653dc1b3546..44e75ca28cb65ef22b2b7a876475423f364355eb 100644
--- a/pkg/intl/test/date_time_format_test_core.dart
+++ b/pkg/intl/test/date_time_format_test_core.dart
@@ -373,7 +373,12 @@ void runDateTests(Function subsetFunc) {
*/
Map<int, DateTime> generateDates(int year, int leapDay) =>
new Iterable.generate(365 + leapDay, (n) => n + 1)
- .map((day) => new DateTime(year, 1, day)).toList().asMap();
+ .map((day) {
+ var result = new DateTime(year, 1, day);
+ // TODO(alanknight): This is a workaround for dartbug.com/15560.
+ if (result.toUtc() == result) result = new DateTime(year, 1, day);
+ return result;
+ }).toList().asMap();
void verifyOrdinals(Map dates) {
var f = new DateFormat("D");
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698