Expand description
Assertion macros.
This crate provides additional assert macros to make testing easier. claym
does not have
depndencies and it can be used in a no-std
environment.
All the macros in this crate has debug_*
counterparts, like any assertion macros in the
standard libraries.
Assertions similar to assert_eq!
or assert_ne!
:
Assertions for Result
variants:
Assertions for Option
variants:
Assertions for Poll
variants:
Assertions for Iterator
variants:
Macros§
- Asserts that the iterator contains a given element.
- Asserts that expression returns
Err
variant. - Asserts that expression returns
Err
variant and its value equals to the right expression. - Asserts that first expression is greater or equal than the second.
- Asserts that first expression is greater than the second.
- Asserts that the iterator has the given length.
- Asserts that the iterator is empty.
- Asserts that the iterator is not empty.
- Asserts that first expression is less or equal than the second.
- Asserts that first expression is less than the second.
- Asserts that expression matches any of the given variants.
- Asserts that expression returns
None
variant. - Asserts that expression returns
Ok
variant. - Asserts that expression returns
Ok
variant and its value equals to the right expression. - Asserts that expression returns
Pending
variant. - Asserts that expression returns
Ready
variant. - Asserts that expression returns
Ready
variant and its value equals to the right expression. - Asserts that expression returns
Ready(Err(..))
variant. - Asserts that expression returns
Ready(Ok(..))
variant. - Asserts that expression returns
Some
variant. - Asserts that expression returns
Some
variant and its value equals to the right expression. - Asserts that the iterator contains a given element.
- Asserts that expression returns
Err
variant. - Asserts that expression returns
Err
variant and its value equals to the right expression. - Asserts that first expression is greater or equal than the second.
- Asserts that first expression is greater than the second.
- Asserts that the iterator has the given length.
- Asserts that the iterator is empty.
- Asserts that the iterator is not empty.
- Asserts that first expression is less or equal than the second.
- Asserts that first expression is less than the second.
- Asserts that expression matches any of the given variants.
- Asserts that expression returns
None
variant. - Asserts that expression returns
Ok
variant. - Asserts that expression returns
Ok
variant and its value equals to the right expression. - Asserts that expression returns
Pending
variant. - Asserts that expression returns
Ready
variant. - Asserts that expression returns
Ready
variant and its value equals to the right expression. - Asserts that expression returns
Ready(Err(..))
variant. - Asserts that expression returns
Ready(Ok(..))
variant. - Asserts that expression returns
Some
variant. - Asserts that expression returns
Some
variant and its value equals to the right expression.