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

Unified Diff: pkg/i18n/test/date_time_format_test.dart

Issue 10836319: Improve i18n date/time test performance (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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/i18n/test/date_time_format_test.dart
===================================================================
--- pkg/i18n/test/date_time_format_test.dart (revision 10918)
+++ pkg/i18n/test/date_time_format_test.dart (working copy)
@@ -158,11 +158,8 @@
DateFormat.YEAR_MONTH];
for(int i = 0; i < formatsToTest.length; i++) {
var skeleton = formatsToTest[i];
- var format = new DateFormat(skeleton, localeName);
- var badPatterns = badSkeletons.map(
- (x) => new DateFormat(x, format.locale).pattern);
-
- if (!badPatterns.some((x) => x == format.pattern)) {
+ if (!badSkeletons.some((x) => x == skeleton)) {
+ var format = new DateFormat(skeleton, localeName);
var actualResult = format.format(date);
var parsed = format.parse(actualResult);
var thenPrintAgain = format.format(parsed);
@@ -173,7 +170,7 @@
main() {
test('Basic date format parsing', () {
- var date_format = new DateFormat();
+ var date_format = new DateFormat("d");
expect(
date_format.parsePattern("hh:mm:ss").map((x) => x.pattern),
orderedEquals(["hh",":", "mm",":","ss"]));
« pkg/i18n/lib/date_format_helpers.dart ('K') | « pkg/i18n/lib/date_format_helpers.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698