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

Unified Diff: pkg/intl/test/date_time_format_file_test_stub.dart

Issue 11028010: Make sure to wrap all callbacks with expectAsync in tests (Closed) Base URL: http://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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/intl/lib/intl_browser.dart ('k') | pkg/intl/test/date_time_format_http_request_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/intl/test/date_time_format_file_test_stub.dart
===================================================================
--- pkg/intl/test/date_time_format_file_test_stub.dart (revision 13089)
+++ pkg/intl/test/date_time_format_file_test_stub.dart (working copy)
@@ -14,16 +14,21 @@
#import('dart:io');
#import('date_time_format_test_core.dart');
#import('data_directory.dart');
+#import('../../../pkg/unittest/unittest.dart');
runWith([Function getSubset]) {
// Initialize one locale just so we know what the list is.
- initializeDateFormatting("en_US", dataDirectory).then(
- (_) => runEverything(getSubset));
+ test('Run everything', () {
Emily Fortuna 2012/10/02 00:42:55 can we make this test name more descriptive? like
Alan Knight 2012/10/02 20:12:21 Done.
+ initializeDateFormatting("en_US", dataDirectory).then(
+ expectAsync1((_) => runEverything(getSubset)));
+ });
}
void runEverything(Function getSubset) {
// Initialize all locales and wait for them to finish before running tests.
var futures = DateFormat.allLocalesWithSymbols().map(
(locale) => initializeDateFormatting(locale, dataDirectory));
- Futures.wait(futures).then((results) => runDateTests(getSubset()));
+ test('Running things', () {
+ Futures.wait(futures).then(
+ expectAsync1((results) => runDateTests(getSubset())));});
Emily Fortuna 2012/10/02 00:42:55 I'd add a line break after the semicolon
Alan Knight 2012/10/02 20:12:21 Done.
}
« no previous file with comments | « pkg/intl/lib/intl_browser.dart ('k') | pkg/intl/test/date_time_format_http_request_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698