From cd9a206d556b7eed5186b7307d6783addd7d387e Mon Sep 17 00:00:00 2001 From: Nicholas Shahan Date: Mon, 13 Jul 2020 18:26:19 +0000 Subject: [PATCH] [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 Reviewed-by: Nicholas Shahan Commit-Queue: Nicholas Shahan --- tests/lib/html/streams_test.dart | 4 ++-- tests/lib_2/html/streams_test.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/lib/html/streams_test.dart b/tests/lib/html/streams_test.dart index 2d5c2101d08e..5f8bd88c054c 100644 --- a/tests/lib/html/streams_test.dart +++ b/tests/lib/html/streams_test.dart @@ -15,7 +15,7 @@ class StreamHelper { } Element get element => _a; - Stream get stream => _a.onFocus; + Stream 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', () { diff --git a/tests/lib_2/html/streams_test.dart b/tests/lib_2/html/streams_test.dart index 63c4bd7e67d5..713a6e6ad09c 100644 --- a/tests/lib_2/html/streams_test.dart +++ b/tests/lib_2/html/streams_test.dart @@ -189,7 +189,7 @@ main() { }); test('reduce', () { - stream.reduce((a, b) => null).then((_) {}); + stream.reduce((a, b) => a).then((_) {}); }); test('fold', () {