macro_rules! assert_that {
($subject:expr) => { ... };
}Expand description
Starts an assertion for the given subject or expression in the
PanicOnFail mode.
It wraps the subject into a Spec and sets the name of the expression and
the code location of the assertion in the Spec. On the Spec any
assertion method that is implemented for the subject’s type can be called.
Assertions started with assert_that! will panic on the first failing
assertion.
§Example
use asserting::prelude::*;
assert_that!(7 * 6).is_equal_to(42);This call of the macro expands to:
assert_that(7 * 6)
.named("7 * 6")
.located_at(Location { file: file!(), line: line!(), column: column!() })
.is_equal_to(42);