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

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

Issue 10917069: Async initialization for DateFormat (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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
Index: pkg/intl/test/date_time_format_local_test.dart
===================================================================
--- pkg/intl/test/date_time_format_local_test.dart (revision 0)
+++ pkg/intl/test/date_time_format_local_test.dart (revision 0)
@@ -0,0 +1,26 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/**
+ * Test date formatting and parsing using locale data which is available
+ * directly in the program as a constant.*/
+
+#library('date_time_format_test');
+
+#import('../date_format.dart');
+#import('../date_time_patterns.dart');
+#import('../date_symbol_data_local.dart');
+#import('date_time_format_test_core.dart');
+
+main() {
+ // Initialize one locale just so we know what the list is.
+ initializeDateFormatting("en_US",null).then(runEverything);
+}
+
+void runEverything(_) {
+ // Initialize all locales and wait for them to finish before running tests.
+ var futures = DateFormat.allLocalesWithSymbols().map(
+ (locale) => initializeDateFormatting(locale, null));
+ Futures.wait(futures).then((results) => runDateTests());
+}

Powered by Google App Engine
This is Rietveld 408576698