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

Unified Diff: test/stream_queue_test.dart

Issue 1215293002: Remove warnings in tests, and even fix analyzer hints. (Closed) Base URL: https://github.com/dart-lang/async@master
Patch Set: Created 5 years, 6 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 | « test/stream_completer_test.dart ('k') | test/subscription_stream_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/stream_queue_test.dart
diff --git a/test/stream_queue_test.dart b/test/stream_queue_test.dart
index a41faf9f615b2a3ff8d641653694da6c8421a8fb..e5fe25cf4687e33119d29f26512c2d010732bddc 100644
--- a/test/stream_queue_test.dart
+++ b/test/stream_queue_test.dart
@@ -37,7 +37,7 @@ main() {
expect(controller.hasListener, isTrue);
expect(controller.isPaused, isTrue);
- var cancel = events.cancel();
+ events.cancel();
expect(controller.hasListener, isFalse);
});
});
@@ -283,6 +283,7 @@ main() {
expect(() => events.take(1), throwsStateError);
expect(() => events.rest, throwsStateError);
expect(() => events.cancel(), throwsStateError);
+ expect(stream.toList(), completion([1, 2, 3, 4]));
});
test("forwards to underlying stream", () async {
@@ -454,9 +455,9 @@ main() {
test("- next after true, enqueued", () async {
var events = new StreamQueue<int>(createStream());
var responses = [];
- var first = events.next.then(responses.add);
- var hasSecond = events.hasNext.then(responses.add);
- var second = events.next.then(responses.add);
+ events.next.then(responses.add);
+ events.hasNext.then(responses.add);
+ events.next.then(responses.add);
do {
await flushMicrotasks();
} while (responses.length < 3);
« no previous file with comments | « test/stream_completer_test.dart ('k') | test/subscription_stream_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698