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

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

Issue 1968033002: Implement everything in test Future-class to avoid analyzer warnings. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | no next file » | 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 6699a6957a8c51e17f4deecaf4e31818f5073699..52185f2ae8044981b6624bb2b8f9a4ecf246b3c5 100644
--- a/tests/lib/async/future_test.dart
+++ b/tests/lib/async/future_test.dart
@@ -1135,8 +1135,14 @@ class UglyFuture implements Future<dynamic> {
c.complete(new Future.microtask(() => action(_result)));
return c.future;
}
- Future catchError(onError, {test}) {} // Never an error.
+ Future catchError(onError, {test}) => this; // Never an error.
Future whenComplete(action()) {
return new Future.microtask(action).then((_) => this);
}
+ Stream asStream() {
+ return (new StreamController()..add(_result)..close()).stream;
+ }
+ Future timeout(Duration duration, {onTimeout()}) {
+ return this;
+ }
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698