diff --git a/pkgs/test/test/utils.dart b/pkgs/test/test/utils.dart index 52c708db4..bc07f0fe8 100644 --- a/pkgs/test/test/utils.dart +++ b/pkgs/test/test/utils.dart @@ -41,7 +41,7 @@ State? lastState; /// /// The most recent emitted state is stored in [_lastState]. void expectStates(LiveTest liveTest, Iterable statesIter) { - var states = Queue.from(statesIter); + var states = Queue.of(statesIter); liveTest.onStateChange.listen(expectAsync1((state) { lastState = state; expect(state, equals(states.removeFirst())); @@ -50,8 +50,9 @@ void expectStates(LiveTest liveTest, Iterable statesIter) { /// Asserts that errors will be emitted via [liveTest.onError] that match /// [validators], in order. -void expectErrors(LiveTest liveTest, Iterable validatorsIter) { - var validators = Queue.from(validatorsIter); +void expectErrors( + LiveTest liveTest, Iterable validatorsIter) { + var validators = Queue.of(validatorsIter); liveTest.onError.listen(expectAsync1((error) { validators.removeFirst()(error.error); }, count: validators.length, max: validators.length)); diff --git a/pkgs/test_api/CHANGELOG.md b/pkgs/test_api/CHANGELOG.md index 22731cb28..193cd4da2 100644 --- a/pkgs/test_api/CHANGELOG.md +++ b/pkgs/test_api/CHANGELOG.md @@ -1,3 +1,5 @@ +## 0.6.2-wip + ## 0.6.1 * Drop support for null unsafe Dart, bump SDK constraint to `3.0.0`. diff --git a/pkgs/test_api/pubspec.yaml b/pkgs/test_api/pubspec.yaml index c67c7baa4..98151f2bd 100644 --- a/pkgs/test_api/pubspec.yaml +++ b/pkgs/test_api/pubspec.yaml @@ -1,5 +1,5 @@ name: test_api -version: 0.6.1 +version: 0.6.2-wip description: >- The user facing API for structuring Dart tests and checking expectations. repository: https://github.com/dart-lang/test/tree/master/pkgs/test_api diff --git a/pkgs/test_api/test/utils.dart b/pkgs/test_api/test/utils.dart index c1fb2e3a8..97058e3ff 100644 --- a/pkgs/test_api/test/utils.dart +++ b/pkgs/test_api/test/utils.dart @@ -27,7 +27,7 @@ State? lastState; /// /// The most recent emitted state is stored in [_lastState]. void expectStates(LiveTest liveTest, Iterable statesIter) { - var states = Queue.from(statesIter); + var states = Queue.of(statesIter); liveTest.onStateChange.listen(expectAsync1((state) { lastState = state; expect(state, equals(states.removeFirst())); @@ -36,8 +36,9 @@ void expectStates(LiveTest liveTest, Iterable statesIter) { /// Asserts that errors will be emitted via [liveTest.onError] that match /// [validators], in order. -void expectErrors(LiveTest liveTest, Iterable validatorsIter) { - var validators = Queue.from(validatorsIter); +void expectErrors( + LiveTest liveTest, Iterable validatorsIter) { + var validators = Queue.of(validatorsIter); liveTest.onError.listen(expectAsync1((error) { validators.removeFirst()(error.error); }, count: validators.length, max: validators.length));