From 1e2e66ff836bf4355a301c4750993f6dec5a5c1e Mon Sep 17 00:00:00 2001 From: "Sergey G. Grekhov" Date: Tue, 13 Feb 2024 13:04:16 +0200 Subject: [PATCH] #2119. Remove unsupported element from Stream.first/lastWhere tests description (#2540) --- LibTest/async/Stream/allTests_A01.lib.dart | 2 +- .../async/Stream/firstWhere_A01_t01.test.dart | 20 ++++++------- .../async/Stream/firstWhere_A01_t02.test.dart | 20 ++++++------- .../async/Stream/firstWhere_A02_t01.test.dart | 22 +++++++-------- .../async/Stream/firstWhere_A03_t01.test.dart | 12 ++++---- .../async/Stream/firstWhere_A03_t02.test.dart | 24 ++++++++-------- .../async/Stream/firstWhere_A03_t03.test.dart | 24 ++++++++-------- .../async/Stream/firstWhere_A03_t04.test.dart | 22 +++++++-------- .../async/Stream/firstWhere_A04_t01.test.dart | 20 ++++++------- .../async/Stream/lastWhere_A01_t01.test.dart | 22 +++++++++------ .../async/Stream/lastWhere_A01_t02.test.dart | 22 +++++++++------ .../async/Stream/lastWhere_A02_t01.test.dart | 28 +++++++++++-------- .../async/Stream/lastWhere_A03_t01.test.dart | 22 +++++++++------ .../async/Stream/lastWhere_A04_t01.test.dart | 24 ++++++++++------ .../async/Stream/lastWhere_A05_t01.test.dart | 22 +++++++++------ .../async/Stream/lastWhere_A06_t01.test.dart | 22 +++++++++------ 16 files changed, 177 insertions(+), 151 deletions(-) diff --git a/LibTest/async/Stream/allTests_A01.lib.dart b/LibTest/async/Stream/allTests_A01.lib.dart index 2fe5e20601..63a38efe8c 100644 --- a/LibTest/async/Stream/allTests_A01.lib.dart +++ b/LibTest/async/Stream/allTests_A01.lib.dart @@ -96,7 +96,7 @@ import "last_A01_t01.test.dart" as last_A01_t01; import "last_A02_t01.test.dart" as last_A02_t01; import "lastWhere_A01_t01.test.dart" as lastWhere_A01_t01; -import "lastWhere_A01_t01.test.dart" as lastWhere_A01_t02; +import "lastWhere_A01_t02.test.dart" as lastWhere_A01_t02; import "lastWhere_A02_t01.test.dart" as lastWhere_A02_t01; import "lastWhere_A04_t01.test.dart" as lastWhere_A04_t01; import "lastWhere_A05_t01.test.dart" as lastWhere_A05_t01; diff --git a/LibTest/async/Stream/firstWhere_A01_t01.test.dart b/LibTest/async/Stream/firstWhere_A01_t01.test.dart index 51918f4e84..bcb79e08e2 100644 --- a/LibTest/async/Stream/firstWhere_A01_t01.test.dart +++ b/LibTest/async/Stream/firstWhere_A01_t01.test.dart @@ -2,22 +2,21 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -/// @assertion Future firstWhere ( -/// bool test(T element), {@deprecated dynamic defaultValue(), T orElse()}) +/// @assertion Future firstWhere (bool test(T element), T orElse()}) /// /// Finds the first element of this stream matching test. /// -/// Returns a future that is completed with the first element of this stream that -/// test returns true for. +/// Returns a future that is completed with the first element of this stream for +/// which test returns true. /// -/// If no such element is found before this stream is done, and a orElse function -/// is provided, the result of calling orElse becomes the value of the future. If -/// orElse throws, the returned future is completed with that error. +/// If no such element is found before this stream is done, and an orElse +/// function is provided, the result of calling orElse becomes the value of the +/// future. If orElse throws, the returned future is completed with that error. /// -/// If this stream emits an error before the first matching element, the returned -/// future is completed with that error, and processing stops. +/// If this stream emits an error before the first matching element, the +/// returned future is completed with that error, and processing stops. /// -/// Stops listening to the stream after the first matching element or error has +/// Stops listening to this stream after the first matching element or error has /// been received. /// /// Internally the method cancels its subscription after the first element that @@ -27,7 +26,6 @@ /// If an error occurs, or if this stream ends without finding a match and with /// no orElse function provided, the returned future is completed with an error. /// -/// The defaultValue parameter is deprecated, and orElse should be used instead. /// @description Checks that if element is found, it is passed to the resulting /// future. [orElse] is omitted. /// @author kaigorodov diff --git a/LibTest/async/Stream/firstWhere_A01_t02.test.dart b/LibTest/async/Stream/firstWhere_A01_t02.test.dart index 18f14bd65c..946346c98e 100644 --- a/LibTest/async/Stream/firstWhere_A01_t02.test.dart +++ b/LibTest/async/Stream/firstWhere_A01_t02.test.dart @@ -2,22 +2,21 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -/// @assertion Future firstWhere ( -/// bool test(T element), {@deprecated dynamic defaultValue(), T orElse()}) +/// @assertion Future firstWhere (bool test(T element), T orElse()}) /// /// Finds the first element of this stream matching test. /// -/// Returns a future that is completed with the first element of this stream that -/// test returns true for. +/// Returns a future that is completed with the first element of this stream for +/// which test returns true. /// -/// If no such element is found before this stream is done, and a orElse function -/// is provided, the result of calling orElse becomes the value of the future. If -/// orElse throws, the returned future is completed with that error. +/// If no such element is found before this stream is done, and an orElse +/// function is provided, the result of calling orElse becomes the value of the +/// future. If orElse throws, the returned future is completed with that error. /// -/// If this stream emits an error before the first matching element, the returned -/// future is completed with that error, and processing stops. +/// If this stream emits an error before the first matching element, the +/// returned future is completed with that error, and processing stops. /// -/// Stops listening to the stream after the first matching element or error has +/// Stops listening to this stream after the first matching element or error has /// been received. /// /// Internally the method cancels its subscription after the first element that @@ -27,7 +26,6 @@ /// If an error occurs, or if this stream ends without finding a match and with /// no orElse function provided, the returned future is completed with an error. /// -/// The defaultValue parameter is deprecated, and orElse should be used instead. /// @description Checks that if element is found, it is passed to the resulting /// future. [orElse] is provided. /// @author kaigorodov diff --git a/LibTest/async/Stream/firstWhere_A02_t01.test.dart b/LibTest/async/Stream/firstWhere_A02_t01.test.dart index 142e5a3d7b..18eaae1c03 100644 --- a/LibTest/async/Stream/firstWhere_A02_t01.test.dart +++ b/LibTest/async/Stream/firstWhere_A02_t01.test.dart @@ -2,22 +2,21 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -/// @assertion Future firstWhere ( -/// bool test(T element), {@deprecated dynamic defaultValue(), T orElse()}) +/// @assertion Future firstWhere (bool test(T element), T orElse()}) /// /// Finds the first element of this stream matching test. /// -/// Returns a future that is completed with the first element of this stream that -/// test returns true for. +/// Returns a future that is completed with the first element of this stream for +/// which test returns true. /// -/// If no such element is found before this stream is done, and a orElse function -/// is provided, the result of calling orElse becomes the value of the future. If -/// orElse throws, the returned future is completed with that error. +/// If no such element is found before this stream is done, and an orElse +/// function is provided, the result of calling orElse becomes the value of the +/// future. If orElse throws, the returned future is completed with that error. /// -/// If this stream emits an error before the first matching element, the returned -/// future is completed with that error, and processing stops. +/// If this stream emits an error before the first matching element, the +/// returned future is completed with that error, and processing stops. /// -/// Stops listening to the stream after the first matching element or error has +/// Stops listening to this stream after the first matching element or error has /// been received. /// /// Internally the method cancels its subscription after the first element that @@ -27,9 +26,8 @@ /// If an error occurs, or if this stream ends without finding a match and with /// no orElse function provided, the returned future is completed with an error. /// -/// The defaultValue parameter is deprecated, and orElse should be used instead. /// @description Checks that if this stream ends without finding a match and an -/// orElse function is provided, then the result of calling orElse becomes +/// [orElse] function is provided, then the result of calling [orElse] becomes /// the value of the future. /// @author kaigorodov diff --git a/LibTest/async/Stream/firstWhere_A03_t01.test.dart b/LibTest/async/Stream/firstWhere_A03_t01.test.dart index 329d9c7a5a..5337434d9d 100644 --- a/LibTest/async/Stream/firstWhere_A03_t01.test.dart +++ b/LibTest/async/Stream/firstWhere_A03_t01.test.dart @@ -2,22 +2,21 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -/// @assertion Future firstWhere ( -/// bool test(T element), {@deprecated dynamic defaultValue(), T orElse()}) +/// @assertion Future firstWhere (bool test(T element), T orElse()}) /// /// Finds the first element of this stream matching test. /// -/// Returns a future that is completed with the first element of this stream -/// that test returns true for. +/// Returns a future that is completed with the first element of this stream for +/// which test returns true. /// -/// If no such element is found before this stream is done, and a orElse +/// If no such element is found before this stream is done, and an orElse /// function is provided, the result of calling orElse becomes the value of the /// future. If orElse throws, the returned future is completed with that error. /// /// If this stream emits an error before the first matching element, the /// returned future is completed with that error, and processing stops. /// -/// Stops listening to the stream after the first matching element or error has +/// Stops listening to this stream after the first matching element or error has /// been received. /// /// Internally the method cancels its subscription after the first element that @@ -27,7 +26,6 @@ /// If an error occurs, or if this stream ends without finding a match and with /// no orElse function provided, the returned future is completed with an error. /// -/// The defaultValue parameter is deprecated, and orElse should be used instead. /// @description Checks that if an error occurs in the stream, the future /// will receive an error. /// @author kaigorodov diff --git a/LibTest/async/Stream/firstWhere_A03_t02.test.dart b/LibTest/async/Stream/firstWhere_A03_t02.test.dart index 36146acb5f..6ef89c5a8c 100644 --- a/LibTest/async/Stream/firstWhere_A03_t02.test.dart +++ b/LibTest/async/Stream/firstWhere_A03_t02.test.dart @@ -2,22 +2,21 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -/// @assertion Future firstWhere ( -/// bool test(T element), {@deprecated dynamic defaultValue(), T orElse()}) +/// @assertion Future firstWhere (bool test(T element), T orElse()}) /// /// Finds the first element of this stream matching test. /// -/// Returns a future that is completed with the first element of this stream that -/// test returns true for. +/// Returns a future that is completed with the first element of this stream for +/// which test returns true. /// -/// If no such element is found before this stream is done, and a orElse function -/// is provided, the result of calling orElse becomes the value of the future. If -/// orElse throws, the returned future is completed with that error. +/// If no such element is found before this stream is done, and an orElse +/// function is provided, the result of calling orElse becomes the value of the +/// future. If orElse throws, the returned future is completed with that error. /// -/// If this stream emits an error before the first matching element, the returned -/// future is completed with that error, and processing stops. +/// If this stream emits an error before the first matching element, the +/// returned future is completed with that error, and processing stops. /// -/// Stops listening to the stream after the first matching element or error has +/// Stops listening to this stream after the first matching element or error has /// been received. /// /// Internally the method cancels its subscription after the first element that @@ -27,9 +26,8 @@ /// If an error occurs, or if this stream ends without finding a match and with /// no orElse function provided, the returned future is completed with an error. /// -/// The defaultValue parameter is deprecated, and orElse should be used instead. -/// @description Checks that if this stream ends without finding a match and with -/// no orElse function provided, the future will receive an error. +/// @description Checks that if this stream ends without finding a match and +/// with no [orElse] function provided, the future will receive an error. /// @author kaigorodov library firstWhere_A03_t02; diff --git a/LibTest/async/Stream/firstWhere_A03_t03.test.dart b/LibTest/async/Stream/firstWhere_A03_t03.test.dart index 1595766a8e..ceabf4fb91 100644 --- a/LibTest/async/Stream/firstWhere_A03_t03.test.dart +++ b/LibTest/async/Stream/firstWhere_A03_t03.test.dart @@ -2,22 +2,21 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -/// @assertion Future firstWhere ( -/// bool test(T element), {@deprecated dynamic defaultValue(), T orElse()}) +/// @assertion Future firstWhere (bool test(T element), T orElse()}) /// /// Finds the first element of this stream matching test. /// -/// Returns a future that is completed with the first element of this stream that -/// test returns true for. +/// Returns a future that is completed with the first element of this stream for +/// which test returns true. /// -/// If no such element is found before this stream is done, and a orElse function -/// is provided, the result of calling orElse becomes the value of the future. If -/// orElse throws, the returned future is completed with that error. +/// If no such element is found before this stream is done, and an orElse +/// function is provided, the result of calling orElse becomes the value of the +/// future. If orElse throws, the returned future is completed with that error. /// -/// If this stream emits an error before the first matching element, the returned -/// future is completed with that error, and processing stops. +/// If this stream emits an error before the first matching element, the +/// returned future is completed with that error, and processing stops. /// -/// Stops listening to the stream after the first matching element or error has +/// Stops listening to this stream after the first matching element or error has /// been received. /// /// Internally the method cancels its subscription after the first element that @@ -27,9 +26,8 @@ /// If an error occurs, or if this stream ends without finding a match and with /// no orElse function provided, the returned future is completed with an error. /// -/// The defaultValue parameter is deprecated, and orElse should be used instead. -/// @description Checks that if an [test] throws error, the future -/// will be completed with that error. +/// @description Checks that if an [test] throws error, the future is completed +/// with that error. /// @author kaigorodov library firstWhere_A03_t03; diff --git a/LibTest/async/Stream/firstWhere_A03_t04.test.dart b/LibTest/async/Stream/firstWhere_A03_t04.test.dart index 1194092789..d128d52586 100644 --- a/LibTest/async/Stream/firstWhere_A03_t04.test.dart +++ b/LibTest/async/Stream/firstWhere_A03_t04.test.dart @@ -2,22 +2,21 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -/// @assertion Future firstWhere ( -/// bool test(T element), {@deprecated dynamic defaultValue(), T orElse()}) +/// @assertion Future firstWhere (bool test(T element), T orElse()}) /// /// Finds the first element of this stream matching test. /// -/// Returns a future that is completed with the first element of this stream that -/// test returns true for. +/// Returns a future that is completed with the first element of this stream for +/// which test returns true. /// -/// If no such element is found before this stream is done, and a orElse function -/// is provided, the result of calling orElse becomes the value of the future. If -/// orElse throws, the returned future is completed with that error. +/// If no such element is found before this stream is done, and an orElse +/// function is provided, the result of calling orElse becomes the value of the +/// future. If orElse throws, the returned future is completed with that error. /// -/// If this stream emits an error before the first matching element, the returned -/// future is completed with that error, and processing stops. +/// If this stream emits an error before the first matching element, the +/// returned future is completed with that error, and processing stops. /// -/// Stops listening to the stream after the first matching element or error has +/// Stops listening to this stream after the first matching element or error has /// been received. /// /// Internally the method cancels its subscription after the first element that @@ -27,9 +26,8 @@ /// If an error occurs, or if this stream ends without finding a match and with /// no orElse function provided, the returned future is completed with an error. /// -/// The defaultValue parameter is deprecated, and orElse should be used instead. /// @description Checks that if this stream ends without finding a match and -/// orElse function throws error, the future will receive that error. +/// [orElse] function throws error, the future will receive that error. /// @author a.semenov@unipro.ru library firstWhere_A03_t04; diff --git a/LibTest/async/Stream/firstWhere_A04_t01.test.dart b/LibTest/async/Stream/firstWhere_A04_t01.test.dart index ac135256f7..858d351031 100644 --- a/LibTest/async/Stream/firstWhere_A04_t01.test.dart +++ b/LibTest/async/Stream/firstWhere_A04_t01.test.dart @@ -2,22 +2,21 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -/// @assertion Future firstWhere ( -/// bool test(T element), {@deprecated dynamic defaultValue(), T orElse()}) +/// @assertion Future firstWhere (bool test(T element), T orElse()}) /// /// Finds the first element of this stream matching test. /// -/// Returns a future that is completed with the first element of this stream that -/// test returns true for. +/// Returns a future that is completed with the first element of this stream for +/// which test returns true. /// -/// If no such element is found before this stream is done, and a orElse function -/// is provided, the result of calling orElse becomes the value of the future. If -/// orElse throws, the returned future is completed with that error. +/// If no such element is found before this stream is done, and an orElse +/// function is provided, the result of calling orElse becomes the value of the +/// future. If orElse throws, the returned future is completed with that error. /// -/// If this stream emits an error before the first matching element, the returned -/// future is completed with that error, and processing stops. +/// If this stream emits an error before the first matching element, the +/// returned future is completed with that error, and processing stops. /// -/// Stops listening to the stream after the first matching element or error has +/// Stops listening to this stream after the first matching element or error has /// been received. /// /// Internally the method cancels its subscription after the first element that @@ -27,7 +26,6 @@ /// If an error occurs, or if this stream ends without finding a match and with /// no orElse function provided, the returned future is completed with an error. /// -/// The defaultValue parameter is deprecated, and orElse should be used instead. /// @description Checks that non broadcast stream can not be listened after /// the first element is returned. /// @author a.semenov@unipro.ru diff --git a/LibTest/async/Stream/lastWhere_A01_t01.test.dart b/LibTest/async/Stream/lastWhere_A01_t01.test.dart index 86f9635f2c..b10c6aeb51 100644 --- a/LibTest/async/Stream/lastWhere_A01_t01.test.dart +++ b/LibTest/async/Stream/lastWhere_A01_t01.test.dart @@ -2,19 +2,25 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -/// @assertion Future lastWhere (bool test(T element), -/// {@deprecated dynamic defaultValue(), T orElse()}) +/// @assertion Future lastWhere(bool test(T element), {T orElse()?}) /// /// Finds the last element in this stream matching test. /// -/// If this stream emits an error, the returned future is completed with that -/// error, and processing stops. +/// Returns a future that is completed with the last element of this stream for +/// which test returns true. /// -/// Otherwise as firstWhere, except that the last matching element is found -/// instead of the first. That means that a non-error result cannot be provided -/// before this stream is done. +/// If no such element is found before this stream is done, and an orElse +/// function is provided, the result of calling orElse becomes the value of the +/// future. If orElse throws, the returned future is completed with that error. +/// +/// If this stream emits an error at any point, the returned future is completed +/// with that error, and the subscription is canceled. +/// +/// A non-error result cannot be provided before this stream is done. +/// +/// Similar too firstWhere, except that the last matching element is found +/// instead of the first. /// -/// The defaultValue parameter is deprecated, and orElse should be used instead. /// @description Checks that if element is found, it is passed to the resulting /// future. [orElse] is omitted. /// @author a.semenov@unipro.ru diff --git a/LibTest/async/Stream/lastWhere_A01_t02.test.dart b/LibTest/async/Stream/lastWhere_A01_t02.test.dart index 56fa20b808..a0d359583e 100644 --- a/LibTest/async/Stream/lastWhere_A01_t02.test.dart +++ b/LibTest/async/Stream/lastWhere_A01_t02.test.dart @@ -2,19 +2,25 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -/// @assertion Future lastWhere (bool test(T element), -/// {@deprecated dynamic defaultValue(), T orElse()}) +/// @assertion Future lastWhere(bool test(T element), {T orElse()?}) /// /// Finds the last element in this stream matching test. /// -/// If this stream emits an error, the returned future is completed with that -/// error, and processing stops. +/// Returns a future that is completed with the last element of this stream for +/// which test returns true. /// -/// Otherwise as firstWhere, except that the last matching element is found -/// instead of the first. That means that a non-error result cannot be provided -/// before this stream is done. +/// If no such element is found before this stream is done, and an orElse +/// function is provided, the result of calling orElse becomes the value of the +/// future. If orElse throws, the returned future is completed with that error. +/// +/// If this stream emits an error at any point, the returned future is completed +/// with that error, and the subscription is canceled. +/// +/// A non-error result cannot be provided before this stream is done. +/// +/// Similar too firstWhere, except that the last matching element is found +/// instead of the first. /// -/// The defaultValue parameter is deprecated, and orElse should be used instead. /// @description Checks that if element is found, it is passed to the resulting /// future. [orElse] is provided. /// @author a.semenov@unipro.ru diff --git a/LibTest/async/Stream/lastWhere_A02_t01.test.dart b/LibTest/async/Stream/lastWhere_A02_t01.test.dart index f76a022c22..84defe0d21 100644 --- a/LibTest/async/Stream/lastWhere_A02_t01.test.dart +++ b/LibTest/async/Stream/lastWhere_A02_t01.test.dart @@ -2,22 +2,28 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -/// @assertion Future lastWhere (bool test(T element), -/// {@deprecated dynamic defaultValue(), T orElse()}) +/// @assertion Future lastWhere(bool test(T element), {T orElse()?}) /// /// Finds the last element in this stream matching test. /// -/// If this stream emits an error, the returned future is completed with that -/// error, and processing stops. +/// Returns a future that is completed with the last element of this stream for +/// which test returns true. /// -/// Otherwise as firstWhere, except that the last matching element is found -/// instead of the first. That means that a non-error result cannot be provided -/// before this stream is done. +/// If no such element is found before this stream is done, and an orElse +/// function is provided, the result of calling orElse becomes the value of the +/// future. If orElse throws, the returned future is completed with that error. /// -/// The defaultValue parameter is deprecated, and orElse should be used instead. -/// @description Checks that if this stream ends without finding a match and a -/// defaultValue function is provided, the result of calling [orElse] becomes -/// the value of the future. +/// If this stream emits an error at any point, the returned future is completed +/// with that error, and the subscription is canceled. +/// +/// A non-error result cannot be provided before this stream is done. +/// +/// Similar too firstWhere, except that the last matching element is found +/// instead of the first. +/// +/// @description Checks that if this stream ends without finding a match and an +/// [orElse] function is provided, the result of calling [orElse] becomes the +/// value of the future. /// @author kaigorodov library lastWhere_A02_t01; diff --git a/LibTest/async/Stream/lastWhere_A03_t01.test.dart b/LibTest/async/Stream/lastWhere_A03_t01.test.dart index e8d9e38b29..964d727f0b 100644 --- a/LibTest/async/Stream/lastWhere_A03_t01.test.dart +++ b/LibTest/async/Stream/lastWhere_A03_t01.test.dart @@ -2,19 +2,25 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -/// @assertion Future lastWhere (bool test(T element), -/// {@deprecated dynamic defaultValue(), T orElse()}) +/// @assertion Future lastWhere(bool test(T element), {T orElse()?}) /// /// Finds the last element in this stream matching test. /// -/// If this stream emits an error, the returned future is completed with that -/// error, and processing stops. +/// Returns a future that is completed with the last element of this stream for +/// which test returns true. /// -/// Otherwise as firstWhere, except that the last matching element is found -/// instead of the first. That means that a non-error result cannot be provided -/// before this stream is done. +/// If no such element is found before this stream is done, and an orElse +/// function is provided, the result of calling orElse becomes the value of the +/// future. If orElse throws, the returned future is completed with that error. +/// +/// If this stream emits an error at any point, the returned future is completed +/// with that error, and the subscription is canceled. +/// +/// A non-error result cannot be provided before this stream is done. +/// +/// Similar too firstWhere, except that the last matching element is found +/// instead of the first. /// -/// The defaultValue parameter is deprecated, and orElse should be used instead. /// @description Checks that if an error occurs in the stream, the future will /// receive that error. /// @author kaigorodov diff --git a/LibTest/async/Stream/lastWhere_A04_t01.test.dart b/LibTest/async/Stream/lastWhere_A04_t01.test.dart index 868b8ab429..2b75c59e13 100644 --- a/LibTest/async/Stream/lastWhere_A04_t01.test.dart +++ b/LibTest/async/Stream/lastWhere_A04_t01.test.dart @@ -2,20 +2,26 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -/// @assertion Future lastWhere (bool test(T element), -/// {@deprecated dynamic defaultValue(), T orElse()}) +/// @assertion Future lastWhere(bool test(T element), {T orElse()?}) /// /// Finds the last element in this stream matching test. /// -/// If this stream emits an error, the returned future is completed with that -/// error, and processing stops. +/// Returns a future that is completed with the last element of this stream for +/// which test returns true. /// -/// Otherwise as firstWhere, except that the last matching element is found -/// instead of the first. That means that a non-error result cannot be provided -/// before this stream is done. +/// If no such element is found before this stream is done, and an orElse +/// function is provided, the result of calling orElse becomes the value of the +/// future. If orElse throws, the returned future is completed with that error. /// -/// The defaultValue parameter is deprecated, and orElse should be used instead. -/// @description Checks that if this stream ends without finding a match and with +/// If this stream emits an error at any point, the returned future is completed +/// with that error, and the subscription is canceled. +/// +/// A non-error result cannot be provided before this stream is done. +/// +/// Similar too firstWhere, except that the last matching element is found +/// instead of the first. +/// +/// @description Checks that if this stream ends without finding a match and /// no [orElse] function provided, the future will receive an error. /// @author kaigorodov diff --git a/LibTest/async/Stream/lastWhere_A05_t01.test.dart b/LibTest/async/Stream/lastWhere_A05_t01.test.dart index 258c1d84a8..ffdf146761 100644 --- a/LibTest/async/Stream/lastWhere_A05_t01.test.dart +++ b/LibTest/async/Stream/lastWhere_A05_t01.test.dart @@ -2,19 +2,25 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -/// @assertion Future lastWhere (bool test(T element), -/// {@deprecated dynamic defaultValue(), T orElse()}) +/// @assertion Future lastWhere(bool test(T element), {T orElse()?}) /// /// Finds the last element in this stream matching test. /// -/// If this stream emits an error, the returned future is completed with that -/// error, and processing stops. +/// Returns a future that is completed with the last element of this stream for +/// which test returns true. /// -/// Otherwise as firstWhere, except that the last matching element is found -/// instead of the first. That means that a non-error result cannot be provided -/// before this stream is done. +/// If no such element is found before this stream is done, and an orElse +/// function is provided, the result of calling orElse becomes the value of the +/// future. If orElse throws, the returned future is completed with that error. +/// +/// If this stream emits an error at any point, the returned future is completed +/// with that error, and the subscription is canceled. +/// +/// A non-error result cannot be provided before this stream is done. +/// +/// Similar too firstWhere, except that the last matching element is found +/// instead of the first. /// -/// The defaultValue parameter is deprecated, and orElse should be used instead. /// @description Checks that if [test] throws error, the returned future will /// receive this error. /// @author a.semenov@unipro diff --git a/LibTest/async/Stream/lastWhere_A06_t01.test.dart b/LibTest/async/Stream/lastWhere_A06_t01.test.dart index b2c422ffe9..d3da0662c9 100644 --- a/LibTest/async/Stream/lastWhere_A06_t01.test.dart +++ b/LibTest/async/Stream/lastWhere_A06_t01.test.dart @@ -2,19 +2,25 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -/// @assertion Future lastWhere (bool test(T element), -/// {@deprecated dynamic defaultValue(), T orElse()}) +/// @assertion Future lastWhere(bool test(T element), {T orElse()?}) /// /// Finds the last element in this stream matching test. /// -/// If this stream emits an error, the returned future is completed with that -/// error, and processing stops. +/// Returns a future that is completed with the last element of this stream for +/// which test returns true. /// -/// Otherwise as firstWhere, except that the last matching element is found -/// instead of the first. That means that a non-error result cannot be provided -/// before this stream is done. +/// If no such element is found before this stream is done, and an orElse +/// function is provided, the result of calling orElse becomes the value of the +/// future. If orElse throws, the returned future is completed with that error. +/// +/// If this stream emits an error at any point, the returned future is completed +/// with that error, and the subscription is canceled. +/// +/// A non-error result cannot be provided before this stream is done. +/// +/// Similar too firstWhere, except that the last matching element is found +/// instead of the first. /// -/// The defaultValue parameter is deprecated, and orElse should be used instead. /// @description Checks that if [orElse] throws error, the returned future will /// receive this error. /// @author a.semenov@unipro