diff --git a/CHANGELOG.md b/CHANGELOG.md index 7878fb7..94cfb08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.1.5 + +* Change TestStdinAsync.controller to StreamController> (instead of + using dynamic as the type argument). + ## 0.1.4 * Added `BazelWorkerDriver` class, which can be used to implement the bazel side diff --git a/lib/testing.dart b/lib/testing.dart index 1afd231..a8b66c1 100644 --- a/lib/testing.dart +++ b/lib/testing.dart @@ -50,8 +50,8 @@ class TestStdinSync implements TestStdin { /// Note: You must call [close] in order for the loop to exit properly. class TestStdinAsync implements TestStdin { /// Controls the stream for async delivery of bytes. - final StreamController _controller = new StreamController(); - StreamController get controller => _controller; + final StreamController> _controller = new StreamController(); + StreamController> get controller => _controller; /// Adds all the [bytes] to this stream. void addInputBytes(List bytes) { @@ -67,9 +67,7 @@ class TestStdinAsync implements TestStdin { StreamSubscription> listen(onData(List bytes), {Function onError, void onDone(), bool cancelOnError}) { return _controller.stream.listen(onData, - onError: onError, - onDone: onDone, - cancelOnError: cancelOnError) as StreamSubscription>; + onError: onError, onDone: onDone, cancelOnError: cancelOnError); } @override diff --git a/pubspec.yaml b/pubspec.yaml index 9f88507..0c1db7c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: bazel_worker -version: 0.1.4 +version: 0.1.5 description: Tools for creating a bazel persistent worker. author: Dart Team homepage: https://github.com/dart-lang/bazel_worker diff --git a/test/worker_loop_test.dart b/test/worker_loop_test.dart index 1ef2845..2356060 100644 --- a/test/worker_loop_test.dart +++ b/test/worker_loop_test.dart @@ -48,13 +48,13 @@ void main() { }); } -void runTests/**/( +void runTests( TestStdin stdinFactory(), - /*=T*/ workerConnectionFactory(Stdin stdin, Stdout stdout), - TestWorkerLoop workerLoopFactory(/*=T*/ connection)) { + T workerConnectionFactory(Stdin stdin, Stdout stdout), + TestWorkerLoop workerLoopFactory(T connection)) { TestStdin stdinStream; TestStdoutStream stdoutStream; - var/*=T*/ connection; + T connection; TestWorkerLoop workerLoop; setUp(() {