forked from dart-lang/co19
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dart-lang#2119. Remove unsupported element from Stream.first/lastWher…
…e tests description
- Loading branch information
Showing
16 changed files
with
177 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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<T> firstWhere ( | ||
/// bool test(T element), {@deprecated dynamic defaultValue(), T orElse()}) | ||
/// @assertion Future<T> 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 [email protected] | ||
library firstWhere_A03_t04; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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<T> firstWhere ( | ||
/// bool test(T element), {@deprecated dynamic defaultValue(), T orElse()}) | ||
/// @assertion Future<T> 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 [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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<T> lastWhere (bool test(T element), | ||
/// {@deprecated dynamic defaultValue(), T orElse()}) | ||
/// @assertion Future<T> 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 [email protected] | ||
|
Oops, something went wrong.