stream_assert

Crates.iostream_assert
lib.rsstream_assert
version0.1.1
sourcesrc
created_at2023-05-30 18:50:21.313988
updated_at2023-09-06 15:34:41.267975
descriptionMacros to simplify testing of `Stream` based APIs
homepage
repositoryhttps://codeberg.org/jplatte/stream_assert
max_upload_size
id878210
size22,961
Ivan Enderlin (Hywan)

documentation

README

stream_assert

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);
Commit count: 0

cargo fmt