test_eq!
assert_eq!-like macros that return a Result instead.
The primary use case is in writing parsers, where you want to check that magic values are correct and that values
are as expected. The macros are implemented using macro_rules and should therefore not have a significant impact
on compile times.
Usage
This crate contains two kinds of macros:
- Macros that check variables are as expected (
test_eq!,test_any!, …). - Macros that compose the check macros (
test_and!andtest_or!).
Examples
use ;
Features
line-info
Provide the location in the source file where the error happened. This feature is enabled by default.
This information is set at compile time and cannot be removed with debug=false or strip=true.