Boolean assertions
There are two boolean assertions:
// Ensure that value is true
assert!(value);
// Ensure that value is false
assert_not!(value);
They both take a single true/false argument.
Details (advanced)
The values must be of type bool
.
Assertion | Panic condition |
---|---|
assert |
!value |
assert_not |
value |