| 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 date formatting and parsing using locale data read from the | 6 * Tests date formatting and parsing using locale data read from the |
| 7 * local file system. | 7 * local file system. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 library date_time_format_file_test; | 10 library date_time_format_file_test; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 // Initialize one locale just so we know what the list is. | 21 // Initialize one locale just so we know what the list is. |
| 22 test('Run all date formatting tests with locales from files', () { | 22 test('Run all date formatting tests with locales from files', () { |
| 23 initializeDateFormatting("en_US", dataDirectory).then( | 23 initializeDateFormatting("en_US", dataDirectory).then( |
| 24 expectAsync1((_) => runEverything(getSubset))); | 24 expectAsync1((_) => runEverything(getSubset))); |
| 25 }); | 25 }); |
| 26 } | 26 } |
| 27 | 27 |
| 28 void runEverything(Function getSubset) { | 28 void runEverything(Function getSubset) { |
| 29 // Initialize all locales and wait for them to finish before running tests. | 29 // Initialize all locales and wait for them to finish before running tests. |
| 30 var futures = DateFormat.allLocalesWithSymbols().mappedBy( | 30 var futures = DateFormat.allLocalesWithSymbols().mappedBy( |
| 31 (locale) => initializeDateFormatting(locale, dataDirectory)); | 31 (locale) => initializeDateFormatting(locale, dataDirectory)) |
| 32 .toList(); |
| 32 test('Run all date formatting tests nested test', () { | 33 test('Run all date formatting tests nested test', () { |
| 33 Futures.wait(futures).then( | 34 Futures.wait(futures).then( |
| 34 expectAsync1((results) => runDateTests(getSubset()))); | 35 expectAsync1((results) => runDateTests(getSubset()))); |
| 35 }); | 36 }); |
| 36 } | 37 } |
| OLD | NEW |