| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 /** | |
| 6 * Tests date formatting and parsing using locale data read from the | |
| 7 * local file system. | |
| 8 */ | |
| 9 library date_time_format_file_test; | |
| 10 | |
| 11 import 'dart:async'; | |
| 12 import 'package:intl/intl.dart'; | |
| 13 import 'package:intl/date_symbol_data_file.dart'; | |
| 14 import 'dart:io'; | |
| 15 import 'date_time_format_test_core.dart'; | |
| 16 import 'data_directory.dart'; | |
| 17 import 'package:unittest/unittest.dart'; | |
| 18 | |
| 19 runWith([Function getSubset]) { | |
| 20 // Initialize one locale just so we know what the list is. | |
| 21 test('Run all date formatting tests with locales from files', () { | |
| 22 initializeDateFormatting("en_US", dataDirectory).then( | |
| 23 expectAsync1((_) => runEverything(getSubset))); | |
| 24 }); | |
| 25 } | |
| 26 | |
| 27 void runEverything(Function getSubset) { | |
| 28 // Initialize all locales sequentially before running tests. Be sure not | |
| 29 // to do it in parallel or we can run into ulimit problems on fast machines. | |
| 30 var futureList = Future.forEach(DateFormat.allLocalesWithSymbols(), | |
| 31 (locale) => initializeDateFormatting(locale, dataDirectory)); | |
| 32 | |
| 33 test('Run all date formatting tests nested test', () { | |
| 34 futureList.then( | |
| 35 expectAsync1((results) => runDateTests(getSubset()))); | |
| 36 }); | |
| 37 } | |
| OLD | NEW |