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

Side by Side Diff: pkg/intl/test/date_time_format_test_stub.dart

Issue 113223002: Write a README for the Intl package (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
« pkg/intl/README.md ('K') | « pkg/intl/lib/intl.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * Test date formatting and parsing using locale data which is available 6 * Test date formatting and parsing using locale data which is available
7 * directly in the program as a constant. 7 * directly in the program as a constant.
8 */ 8 */
9 9
10 library date_time_format_test; 10 library date_time_format_test;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 void runWith(TestListFunc getSubset, String dir, 46 void runWith(TestListFunc getSubset, String dir,
47 InitializeDateFormattingFunc initFunction) { 47 InitializeDateFormattingFunc initFunction) {
48 // Initialize one locale just so we know what the list is. 48 // Initialize one locale just so we know what the list is.
49 // Also, note that we take the list of locales as a function so that we don't 49 // Also, note that we take the list of locales as a function so that we don't
50 // evaluate it until after we know that all the locales are available. 50 // evaluate it until after we know that all the locales are available.
51 51
52 bool initialized = false; 52 bool initialized = false;
53 53
54 setUp(() { 54 setUp(() {
55 if(initialized) { 55 if(initialized) {
56 return; 56 return null;
57 } 57 }
58 return initFunction("en_US", dir) 58 return initFunction("en_US", dir)
59 .then((_) { 59 .then((_) {
60 return Future.forEach(DateFormat.allLocalesWithSymbols(), (locale) { 60 return Future.forEach(DateFormat.allLocalesWithSymbols(), (locale) {
61 return initFunction(locale, dir); 61 return initFunction(locale, dir);
62 }); 62 });
63 }) 63 })
64 .then((_) { 64 .then((_) {
65 initialized = true; 65 initialized = true;
66 }); 66 });
67 }); 67 });
68 68
69 runDateTests(getSubset); 69 runDateTests(getSubset);
70 } 70 }
OLDNEW
« pkg/intl/README.md ('K') | « pkg/intl/lib/intl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698