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

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

Issue 11267018: Make getKeys, getValues getters (keys, values). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status files with co19 issue number. Created 8 years, 1 month 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
« no previous file with comments | « pkg/intl/lib/src/lazy_locale_data.dart ('k') | pkg/intl/test/number_format_test.dart » ('j') | 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 * Tests the DateFormat library in dart. This file contains core tests that 6 * Tests the DateFormat library in dart. This file contains core tests that
7 * are run regardless of where the locale data is found, so it doesn't expect to 7 * are run regardless of where the locale data is found, so it doesn't expect to
8 * be run on its own, but rather to be imported and run from another test file. 8 * be run on its own, but rather to be imported and run from another test file.
9 */ 9 */
10 10
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 testRoundTripParsing(locale, aDate); 244 testRoundTripParsing(locale, aDate);
245 } 245 }
246 for (var hour in hours) { 246 for (var hour in hours) {
247 var aDate = new Date(2012, 1, 27, hour, 58, 59, 123); 247 var aDate = new Date(2012, 1, 27, hour, 58, 59, 123);
248 testRoundTripParsing(locale, aDate); 248 testRoundTripParsing(locale, aDate);
249 } 249 }
250 } 250 }
251 }); 251 });
252 252
253 test('Patterns and symbols have the same coverage',() { 253 test('Patterns and symbols have the same coverage',() {
254 var patterns = new List.from(dateTimePatterns.getKeys()); 254 var patterns = new List.from(dateTimePatterns.keys);
255 var compare = (a, b) => a.compareTo(b); 255 var compare = (a, b) => a.compareTo(b);
256 patterns.sort(compare); 256 patterns.sort(compare);
257 var symbols = allLocales(); 257 var symbols = allLocales();
258 // Workaround for a dartj2 issue that treats the keys as immutable 258 // Workaround for a dartj2 issue that treats the keys as immutable
259 symbols = new List.from(symbols); 259 symbols = new List.from(symbols);
260 symbols.sort(compare); 260 symbols.sort(compare);
261 for (var i = 0; i < patterns.length; i++) 261 for (var i = 0; i < patterns.length; i++)
262 expect(patterns[i], equals(symbols[i])); 262 expect(patterns[i], equals(symbols[i]));
263 expect(patterns.length, equals(symbols.length)); 263 expect(patterns.length, equals(symbols.length));
264 }); 264 });
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 338
339 test('Test default format', () { 339 test('Test default format', () {
340 var someDate = new Date(2012, 1, 27, 20, 58, 59, 1); 340 var someDate = new Date(2012, 1, 27, 20, 58, 59, 1);
341 var emptyFormat = new DateFormat(null, "en_US"); 341 var emptyFormat = new DateFormat(null, "en_US");
342 var knownDefault = new DateFormat.yMMMMd("en_US").add_jms(); 342 var knownDefault = new DateFormat.yMMMMd("en_US").add_jms();
343 var result = emptyFormat.format(someDate); 343 var result = emptyFormat.format(someDate);
344 var knownResult = knownDefault.format(someDate); 344 var knownResult = knownDefault.format(someDate);
345 expect(result, knownResult); 345 expect(result, knownResult);
346 }); 346 });
347 } 347 }
OLDNEW
« no previous file with comments | « pkg/intl/lib/src/lazy_locale_data.dart ('k') | pkg/intl/test/number_format_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698