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

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

Issue 10917275: Update unittest to new package layout. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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
« no previous file with comments | « pkg/intl/test/bidi_utils_test.dart ('k') | pkg/intl/test/intl_message_basic_example_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
11 #library('date_time_format_tests'); 11 #library('date_time_format_tests');
12 12
13 // TODO(rnystrom): Use "package:" URL (#4968).
13 #import('../date_format.dart'); 14 #import('../date_format.dart');
14 #import('../../../pkg/unittest/unittest.dart'); 15 #import('../../../pkg/unittest/lib/unittest.dart');
15 #import('date_time_format_test_data.dart'); 16 #import('date_time_format_test_data.dart');
16 #import('../intl.dart'); 17 #import('../intl.dart');
17 #import('../lib/date_format_internal.dart'); 18 #import('../lib/date_format_internal.dart');
18 19
19 var formatsToTest = const [ 20 var formatsToTest = const [
20 DateFormat.DAY, 21 DateFormat.DAY,
21 DateFormat.ABBR_WEEKDAY, 22 DateFormat.ABBR_WEEKDAY,
22 DateFormat.WEEKDAY, 23 DateFormat.WEEKDAY,
23 DateFormat.ABBR_STANDALONE_MONTH, 24 DateFormat.ABBR_STANDALONE_MONTH,
24 DateFormat.STANDALONE_MONTH, 25 DateFormat.STANDALONE_MONTH,
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 var localPrinted = format.format(local); 324 var localPrinted = format.format(local);
324 var parsed = format.parse(localPrinted); 325 var parsed = format.parse(localPrinted);
325 var parsedUTC = format.parseUTC(format.format(utc)); 326 var parsedUTC = format.parseUTC(format.format(utc));
326 var parsedOffset = parsedUTC.millisecondsSinceEpoch 327 var parsedOffset = parsedUTC.millisecondsSinceEpoch
327 - parsed.millisecondsSinceEpoch; 328 - parsed.millisecondsSinceEpoch;
328 expect(parsedOffset, equals(offset)); 329 expect(parsedOffset, equals(offset));
329 expect(utc.hour, equals(parsedUTC.hour)); 330 expect(utc.hour, equals(parsedUTC.hour));
330 expect(local.hour, equals(parsed.hour)); 331 expect(local.hour, equals(parsed.hour));
331 }); 332 });
332 } 333 }
OLDNEW
« no previous file with comments | « pkg/intl/test/bidi_utils_test.dart ('k') | pkg/intl/test/intl_message_basic_example_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698