OLD | NEW |
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 import '../../../pkg/unittest/unittest.dart'; | 13 import '../../../pkg/unittest/lib/unittest.dart'; |
14 import 'date_time_format_test_data.dart'; | 14 import 'date_time_format_test_data.dart'; |
15 import '../lib/intl.dart'; | 15 import '../lib/intl.dart'; |
16 import '../lib/src/date_format_internal.dart'; | 16 import '../lib/src/date_format_internal.dart'; |
17 | 17 |
18 var formatsToTest = const [ | 18 var formatsToTest = const [ |
19 DateFormat.DAY, | 19 DateFormat.DAY, |
20 DateFormat.ABBR_WEEKDAY, | 20 DateFormat.ABBR_WEEKDAY, |
21 DateFormat.WEEKDAY, | 21 DateFormat.WEEKDAY, |
22 DateFormat.ABBR_STANDALONE_MONTH, | 22 DateFormat.ABBR_STANDALONE_MONTH, |
23 DateFormat.STANDALONE_MONTH, | 23 DateFormat.STANDALONE_MONTH, |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 | 339 |
340 test('Test default format', () { | 340 test('Test default format', () { |
341 var someDate = new Date(2012, 1, 27, 20, 58, 59, 1); | 341 var someDate = new Date(2012, 1, 27, 20, 58, 59, 1); |
342 var emptyFormat = new DateFormat(null, "en_US"); | 342 var emptyFormat = new DateFormat(null, "en_US"); |
343 var knownDefault = new DateFormat.yMMMMd("en_US").add_jms(); | 343 var knownDefault = new DateFormat.yMMMMd("en_US").add_jms(); |
344 var result = emptyFormat.format(someDate); | 344 var result = emptyFormat.format(someDate); |
345 var knownResult = knownDefault.format(someDate); | 345 var knownResult = knownDefault.format(someDate); |
346 expect(result, knownResult); | 346 expect(result, knownResult); |
347 }); | 347 }); |
348 } | 348 } |
OLD | NEW |