Macro nom_test_helpers::assert_error[][src]

macro_rules! assert_error {
    ($e:expr $(,)?) => { ... };
    ($e:expr, $($arg:tt)+) => { ... };
}

This asserts that the IResult is an Err

Examples

use nom_test_helpers::assert_error;

let r: nom::IResult<&[u8], &[u8]> = Err(nom::Err::Error(nom::error::Error::new(&b""[..], nom::error::ErrorKind::Count)));
assert_error!(r);