Skip to main content

check_decoder

Function check_decoder 

Source
pub fn check_decoder<D: Decoder>(decoder: D, bytes: &[u8], expected: &D::Output)
where D::Output: Eq + Debug, D::Error: Debug,
Expand description

Checks that the given decoder produces the expected value, panicking if it doesn’t.

This is intended for tests only.

§Panics

If the decoder doesn’t produce the expected value or if decoding fails.