Module testing

Source
Expand description

Helpers for testing implementations of the async-codec traits.

Functionsยง

test_codec
Run an encoder and a decoder concurrently, returning the decoded output and whether the encoder produced as many bytes as the decoder consumed.
test_codec_len
Run an encoder and a decoder concurrently, returning the decoded output and whether the encoder produced as many bytes as it promised and as the decoder consumed.
unexpected_eof_errors
Returns whether the given decoder returns an error of kind UnexpectedEof when trying to fully decode from the given reader.
write_zero_errors
Returns whether the given encoder returns an error of kind WriteZero when trying to fully encode into the given writer.