Expand description
Additional assertion macros for testing.
§Available macros
Note that, like core
/std
macros, all macros in this crate have 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§
- Asserts that the expression matches an
Err(_)
variant, returning the contained value. - Asserts that the left expression contains an
Err(E)
variant and its contained value of typeE
equals the right expression. - Asserts that the first expression is greater than or equal to the second.
- Asserts that the first expression is greater than the second.
- Asserts that the first expression is less or equal than the second.
- Asserts that the first expression is less than the second.
- Asserts that the expression matches the provided pattern.
- Asserts that the expression is
None
. - Asserts that the expression matches an
Ok(_)
variant, returning the contained value. - Asserts that the left expression contains an
Ok(T)
variant and its contained value of typeT
equals the right expression. - Asserts that the expression matches a
Poll::Pending
variant. - Asserts that the expression matches a
Poll::Ready(_)
variant. - Asserts that the left expression contains a [
Poll::Ready(T)
] variant and its contained value of typeT
equals the right expression. - Asserts that the expression matches a
Poll::Ready(Err(_))
variant, returning the contained value. - Asserts that the expression matches a [
Poll::Ready(Ok(_))
] variant, returning the contained value. - Asserts that the expression matches a
Some(_)
variant, returning the contained value. - Asserts that the left expression contains a
Some(T)
variant and its contained value of typeT
equals the right expression. - Asserts that the expression matches an
Err(_)
variant in debug builds. - Asserts that the left expression contains an
Err(E)
variant and its contained value of typeE
equals the right expression in debug builds. - Asserts that the first expression is greater than or equal to the second on debug builds.
- Asserts that the first expression is greater than the second in debug builds.
- Asserts that the first expression is less or equal than the second on debug builds.
- Asserts that the first expression is less than the second on debug builds.
- Asserts that the expression matches the provided pattern on debug builds.
- Asserts that the expression is
None
on debug builds. - Asserts that the expression matches an
Ok(_)
variant on debug builds. - Asserts that the left expression contains an
Ok(T)
variant and its contained value of typeT
equals the right expression on debug builds. - Asserts that the expression matches a
Poll::Pending
variant on debug builds. - Asserts that the expression matches a
Poll::Ready(_)
variant on debug builds. - Asserts that the left expression contains a
Poll::Ready(T)
variant and its contained value of typeT
equals the right expression on debug builds. - Asserts that the expression matches a
Poll::Ready(Err(_))
variant on debug builds. - Asserts that the expression matches a
Poll::Ready(Ok(_))
variant on debug builds. - Asserts that the expression matches a
Some(_)
variant on debug builds. - Asserts that the left expression contains a
Some(T)
variant and its contained value of typeT
equals the right expression on debug builds.