Macro nom_test_helpers::assert_error_and_eq
[−]
[src]
macro_rules! assert_error_and_eq { ($r:expr, $err:expr) => { ... }; }
This asserts that the IResult is an Error and that the error
is what is expected
Examples
let r: IResult<&[u8], &[u8]> = IResult::Error(Err::Code(ErrorKind::Custom(1))); assert_error_and_eq!(r, Err::Code(ErrorKind::Custom(1)));