[tests] Fix type of stream getter in test

The focus event stream is typed to be non-nullable. Updated the
return of the function passed to reduce in the "_2" version as
well to keep them consistent.

Change-Id: Ic1ae2e027c184d751549c989d60924360139fd5c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154140
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
This commit is contained in:
Nicholas Shahan 2020-07-13 18:26:19 +00:00 committed by commit-bot@chromium.org
parent 6547f741b6
commit cd9a206d55
2 changed files with 3 additions and 3 deletions

View file

@ -15,7 +15,7 @@ class StreamHelper {
}
Element get element => _a;
Stream<Event?> get stream => _a.onFocus;
Stream<Event> get stream => _a.onFocus;
// Causes an event on a to be fired.
void pulse() {
@ -193,7 +193,7 @@ main() {
});
test('reduce', () {
stream.reduce((a, b) => null).then((_) {});
stream.reduce((a, b) => a).then((_) {});
});
test('fold', () {

View file

@ -189,7 +189,7 @@ main() {
});
test('reduce', () {
stream.reduce((a, b) => null).then((_) {});
stream.reduce((a, b) => a).then((_) {});
});
test('fold', () {