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

Unified Diff: pkg/intl/test/date_time_format_http_request_test.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
Index: pkg/intl/test/date_time_format_http_request_test.dart
===================================================================
--- pkg/intl/test/date_time_format_http_request_test.dart (revision 13089)
+++ pkg/intl/test/date_time_format_http_request_test.dart (working copy)
@@ -22,25 +22,27 @@
#import('../lib/date_symbol_data_http_request.dart');
#import('date_time_format_test_core.dart');
#import('dart:html');
+#import('../../../pkg/unittest/unittest.dart');
var url = "http://localhost:8000/dates/";
main() {
// Initialize one locale just so we know what the list is.
- initializeDateFormatting("en_US", url).then(runEverything);
+ test('Run everything', () {
+ initializeDateFormatting("en_US", url).then(expectAsync1(runEverything));});
}
void runEverything(_) {
// Initialize all locales and wait for them to finish before running tests.
var futures = DateFormat.allLocalesWithSymbols().map(
(locale) => initializeDateFormatting(locale, url));
- Futures.wait(futures).then((results) {
- runDateTests();
- shutDown();});
+ Futures.wait(futures).then(expectAsync1((_) {
+ runDateTests();
+ shutDown();}));
}
void shutDown() {
// The tiny web server knows to use this request as a cue to terminate.
- var source = '$url/terminate';
+ var source = '${url}terminate';
var request = new HttpRequest.get(source, (_) {});
}

Powered by Google App Engine
This is Rietveld 408576698