[−][src]Crate claim
Assertion macros.
This crate provides additional assert macros to make testing a bit easier.
#![no_std] support
claim can be used in a no-std environments too.
Available macros
Note that same to core/std macros,
all macros in this crate has the debug_* counterparts.
Comparison
Assertions similar to assert_eq or assert_ne:
Matching
Result macros
Assertions for Result variants:
Option macros
Assertions for Option variants:
Poll macros
Assertions for Poll variants:
Macros
| assert_err | Asserts that expression returns |
| assert_ge | Asserts that first expression is greater or equal than the second. |
| assert_gt | Asserts that first expression is greater than the second. |
| assert_le | Asserts that first expression is less or equal than the second. |
| assert_lt | Asserts that first expression is less than the second. |
| assert_matches | Asserts that expression matches any of the given variants. |
| assert_none | Asserts that expression returns |
| assert_ok | Asserts that expression returns |
| assert_ok_eq | Asserts that expression returns |
| assert_pending | Asserts that expression returns |
| assert_ready | Asserts that expression returns |
| assert_ready_eq | Asserts that left expression returns [ |
| assert_ready_err | Asserts that expression returns |
| assert_ready_ok | Asserts that expression returns |
| assert_some | Asserts that expression returns |
| assert_some_eq | Asserts that left expression returns |
| debug_assert_err | Asserts that expression returns |
| debug_assert_ge | Asserts that first expression is greater or equal than the second in runtime. |
| debug_assert_gt | Asserts that first expression is greater than the second in runtime. |
| debug_assert_le | Asserts that first expression is less or equal than the second in runtime. |
| debug_assert_lt | Asserts that first expression is less than the second in runtime. |
| debug_assert_matches | Asserts that expression matches any of the given variants. |
| debug_assert_none | Asserts that expression returns |
| debug_assert_ok | Asserts that expression returns |
| debug_assert_ok_eq | Asserts that expression returns |
| debug_assert_pending | Asserts that expression returns |
| debug_assert_ready | Asserts that expression returns |
| debug_assert_ready_err | Asserts that expression returns |
| debug_assert_ready_ok | Asserts that expression returns |
| debug_assert_ready_ok_eq | Asserts that left expression returns [ |
| debug_assert_some | Asserts that expression returns |
| debug_assert_some_eq | Asserts that expression returns |