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

Unified Diff: test/stream_channel_test.dart

Issue 2048473002: Fix transformer tests. (Closed) Base URL: git@github.com:dart-lang/stream_channel.git@master
Patch Set: Created 4 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 | « pubspec.yaml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/stream_channel_test.dart
diff --git a/test/stream_channel_test.dart b/test/stream_channel_test.dart
index 2a6566ac7cb5bbd04991ad8fa4ef4b8ce3cbe435..41f4c32ec39ca4bdf253ecc59af41a3e6dd98b65 100644
--- a/test/stream_channel_test.dart
+++ b/test/stream_channel_test.dart
@@ -41,13 +41,13 @@ void main() {
expect(sinkController.stream.toList(), completion(equals([4, 5, 6])));
});
- test("transform() transforms the channel", () {
+ test("transform() transforms the channel", () async {
var transformed = channel.transform(
new StreamChannelTransformer.fromCodec(UTF8));
streamController.add([102, 111, 111, 98, 97, 114]);
streamController.close();
- expect(transformed.stream.toList(), completion(equals(["foobar"])));
+ expect(await transformed.stream.toList(), equals(["foobar"]));
transformed.sink.add("fblthp");
transformed.sink.close();
@@ -55,12 +55,12 @@ void main() {
completion(equals([[102, 98, 108, 116, 104, 112]])));
});
- test("transformStream() transforms only the stream", () {
+ test("transformStream() transforms only the stream", () async {
var transformed = channel.transformStream(UTF8.decoder);
streamController.add([102, 111, 111, 98, 97, 114]);
streamController.close();
- expect(transformed.stream.toList(), completion(equals(["foobar"])));
+ expect(await transformed.stream.toList(), equals(["foobar"]));
transformed.sink.add("fblthp");
transformed.sink.close();
@@ -68,14 +68,14 @@ void main() {
completion(equals(["fblthp"])));
});
- test("transformSink() transforms only the sink", () {
+ test("transformSink() transforms only the sink", () async {
var transformed = channel.transformSink(
new StreamSinkTransformer.fromStreamTransformer(UTF8.encoder));
streamController.add([102, 111, 111, 98, 97, 114]);
streamController.close();
- expect(transformed.stream.toList(),
- completion(equals([[102, 111, 111, 98, 97, 114]])));
+ expect(await transformed.stream.toList(),
+ equals([[102, 111, 111, 98, 97, 114]]));
transformed.sink.add("fblthp");
transformed.sink.close();
« no previous file with comments | « pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698