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

Side by Side Diff: tests/lib/i18n/date_format_test.dart

Issue 10453079: Added i18n skeleton API for message_formatting (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed typing of date_formatting Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 /**
2 * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 * for details. All rights reserved. Use of this source code is governed by a
4 * BSD-style license that can be found in the LICENSE file.
5 */
6
7 #library('date_format_test');
8
9 #import('../../../lib/i18n/date_format.dart');
10 #import('../../../lib/unittest/unittest.dart');
11
12 /**
13 * Tests the DateFormat library in dart.
14 */
15
16 main() {
17 test('Date formatting', () {
18 var date_format = new DateFormat.fullDate();
19 Date date = new Date.now();
20 // TODO(efortuna): Change the expectation once we have a functioning date
21 // formatting class.
22 Expect.stringEquals(date.toString(), date_format.format(date));
23
24 date_format = new DateFormat("hh:mm:ss");
25 Expect.stringEquals(date.toString(), date_format.format(date));
26 });
27
28 test('Date parsing', () {
29 var date_format = new DateFormat.fullDate();
30 Date date = new Date.now();
31 // TODO(efortuna): Change the expectation once we have a functioning date
32 // formatting class.
33 Expect.stringEquals(date_format.parse(date.toString()), date.toString());
34 });
35 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698