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

Unified Diff: tests/lib/async/future_test.dart

Issue 598993002: Add missing null-tests to async error functions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add co19 issue number to status file. Created 6 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 | « tests/co19/co19-co19.status ('k') | tests/lib/async/stream_controller_async_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/async/future_test.dart
diff --git a/tests/lib/async/future_test.dart b/tests/lib/async/future_test.dart
index df33697d7b2833d02e6b14b14418b1f6001b74a9..12cc53b92f5328aa12857463268718c12dd0e65b 100644
--- a/tests/lib/async/future_test.dart
+++ b/tests/lib/async/future_test.dart
@@ -677,8 +677,13 @@ void testCompleteErrorWithCustomFuture() {
}
void testCompleteErrorWithNull() {
+ asyncStart();
final completer = new Completer<int>();
- Expect.throws(() => completer.completeError(null));
+ completer.future.catchError((e) {
+ Expect.isTrue(e is NullThrownError);
+ asyncEnd();
+ });
+ completer.completeError(null);
}
void testChainedFutureValue() {
« no previous file with comments | « tests/co19/co19-co19.status ('k') | tests/lib/async/stream_controller_async_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698