Macro assertables::assume_io_lt [−][src]
assume one value is less than another value.
-
When true, return
Ok(true)
. -
When false, return
Ok(false)
. -
Otherwise, return
Err
with a message and the values of the expressions with their debug representations.
Examples
let x = assume_io_lt!(1, 2); //-> Ok(true)
let x = assume_io_lt!(2, 1); //-> Err( // std::io::Error::new( // std::io::ErrorKind::InvalidInput, // "assumption failed: `assume_io_lt(left, right)`\n left: `2`\n right: `1`")] // ) // )
This macro has a second form where a custom message can be provided.