| Crates.io | stream_assert |
| lib.rs | stream_assert |
| version | 0.1.1 |
| created_at | 2023-05-30 18:50:21.313988+00 |
| updated_at | 2023-09-06 15:34:41.267975+00 |
| description | Macros to simplify testing of `Stream` based APIs |
| homepage | |
| repository | https://codeberg.org/jplatte/stream_assert |
| max_upload_size | |
| id | 878210 |
| size | 22,961 |
Macros to simplify testing of Stream based APIs.
Provides the following assertion macros:
// Assert that the next value is ready and equal to the given expression.
assert_next_eq!(stream, expression);
// Assert that the next value is ready and matches the given pattern.
assert_next_matches!(stream, Enum::Variant { field: 1, .. });
// Assert that the stream is not ready (`poll_next` returns `Pending`).
assert_pending!(stream);
// Assert that the stream is closed (`poll_next` returns `Ready(None)`).
assert_closed!(stream);