Open
Description
The following test fails. Why?
import "dart:async";
import "../../../Utils/expect.dart";
var theController;
main() {
asyncStart();
var stream = Stream<int>.multi((controller) {
theController = controller;
Expect.isFalse(controller.isPaused);
controller.add(1);
controller.add(2);
controller.add(3);
});
listen(stream);
}
void listen(Stream<int> stream) {
late StreamSubscription ss;
ss = stream.listen((v) {
if (v == 1) {
ss.pause(Future.delayed(Duration(milliseconds: 100)));
} else {
Expect.isFalse(theController.isPaused); //Expect.isFalse(true) fails.
}
}, onDone: asyncEnd);
}
cc @lrhn