Skip to content

Commit

Permalink
[tests] Fix type of stream getter in test
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
nshahan authored and commit-bot@chromium.org committed Jul 13, 2020
1 parent 6547f74 commit cd9a206
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/lib/html/streams_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -193,7 +193,7 @@ main() {
});

test('reduce', () {
stream.reduce((a, b) => null).then((_) {});
stream.reduce((a, b) => a).then((_) {});
});

test('fold', () {
Expand Down
2 changes: 1 addition & 1 deletion tests/lib_2/html/streams_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ main() {
});

test('reduce', () {
stream.reduce((a, b) => null).then((_) {});
stream.reduce((a, b) => a).then((_) {});
});

test('fold', () {
Expand Down

0 comments on commit cd9a206

Please sign in to comment.