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

Unified Diff: tests/lib/i18n/date_format_test.dart

Issue 10505005: Polish Date formatting API. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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
« lib/i18n/date_format.dart ('K') | « lib/i18n/date_format.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/i18n/date_format_test.dart
===================================================================
--- tests/lib/i18n/date_format_test.dart (revision 8135)
+++ tests/lib/i18n/date_format_test.dart (working copy)
@@ -4,9 +4,9 @@
* BSD-style license that can be found in the LICENSE file.
*/
-#library('date_format_test');
+#library('date_time_format_test');
-#import('../../../lib/i18n/date_format.dart');
+#import('../../../lib/i18n/date_format.dart');//TODO(efortuna): rename.
#import('../../../lib/unittest/unittest.dart');
/**
@@ -21,8 +21,22 @@
// formatting class.
Expect.stringEquals(date.toString(), date_format.format(date));
- date_format = new DateFormat("hh:mm:ss");
+ date_format = new DateFormat("Hms");
Expect.stringEquals(date.toString(), date_format.format(date));
+
+ date_format = new DateFormat(DateFormat.Hms);
Alan Knight 2012/06/03 17:19:52 This puts us back to having the extra DateFormat t
+ Expect.stringEquals(date.toString(), date_format.format(date));
+
+ date_format = new DateFormat("Hms");
+ Expect.stringEquals(date.toString(), date_format.format(date));
+
+ var intl = new Intl();
+ intl.date.setFormat = intl.date.y;
+ Expect.stringEquals(date.toString(), intl.date.format(date));
+
+
+ intl.date.setFormat = 'y';
+ Expect.stringEquals(date.toString(), intl.date.format(date));
});
test('Date parsing', () {
« lib/i18n/date_format.dart ('K') | « lib/i18n/date_format.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698