| Index: pkg/scheduled_test/test/scheduled_stream/stream_matcher_test.dart
|
| diff --git a/pkg/scheduled_test/test/scheduled_stream/stream_matcher_test.dart b/pkg/scheduled_test/test/scheduled_stream/stream_matcher_test.dart
|
| index 93c6b43cf4d02309417e15d5e33690f95e1a03b9..d7127443d0e50b94277bd7c31205ea5660f56779 100644
|
| --- a/pkg/scheduled_test/test/scheduled_stream/stream_matcher_test.dart
|
| +++ b/pkg/scheduled_test/test/scheduled_stream/stream_matcher_test.dart
|
| @@ -183,23 +183,25 @@ void main(_, message) {
|
| expectTestPasses("consumeThrough() consumes values through the given matcher",
|
| () {
|
| var stream = createStream();
|
| - stream.expect(consumeThrough(greaterThan(2)));
|
| + stream.expect(consumeThrough(inOrder([2, 3])));
|
| stream.expect(4);
|
| });
|
|
|
| expectTestPasses("consumeThrough() will stop if the first value matches", () {
|
| var stream = createStream();
|
| - stream.expect(consumeThrough(1));
|
| - stream.expect(2);
|
| + stream.expect(consumeThrough(inOrder([1, 2])));
|
| + stream.expect(3);
|
| });
|
|
|
| expectTestFails("consumeThrough() will fail if the stream ends before the "
|
| "value is reached", () {
|
| - createStream().expect(consumeThrough(100));
|
| + createStream().expect(consumeThrough(inOrder([5, 6])));
|
| }, (errors) {
|
| expect(errors, hasLength(1));
|
| expect(errors.first.error.message, equals(
|
| - "Expected: values followed by <100>\n"
|
| + "Expected: values followed by:\n"
|
| + " | * <5>\n"
|
| + " | * <6>\n"
|
| " Emitted: * 1\n"
|
| " * 2\n"
|
| " * 3\n"
|
| @@ -215,10 +217,16 @@ void main(_, message) {
|
| stream.expect(4);
|
| });
|
|
|
| + expectTestPasses("consumeWhile() consumes values in chunks", () {
|
| + var stream = createStream();
|
| + stream.expect(consumeWhile(inOrder([anything, anything])));
|
| + stream.expect(5);
|
| + });
|
| +
|
| expectTestPasses("consumeWhile() will stop if the first value doesn't match",
|
| () {
|
| var stream = createStream();
|
| - stream.expect(consumeWhile(2));
|
| + stream.expect(consumeWhile(inOrder([2, 3])));
|
| stream.expect(1);
|
| });
|
|
|
|
|