Crate all_asserts

Source
Expand description

§all_asserts

The all_asserts crate provides multiple assert macros which aren’t there in the standard library. These macros provide extremely useful outputs and can be used for writing better tests.

Macros§

assert_false
Asserts that the expression is false
assert_ge
Asserts that the left hand side expression is greater than or equal to the right hand side expression
assert_gt
Asserts that the left hand side expression is greater than the right hand side expression
assert_le
Asserts that the left hand side expression is lesser than or equal to the right hand side expression
assert_lt
Asserts that the left hand side expression is lesser than the right hand side expression
assert_near
Asserts that the right hand side expression is within the range on the left hand side
assert_nrange
Asserts that the right hand side expression is not within the range on the left hand side
assert_range
Asserts that the right hand side expression is within the range on the left hand side
assert_true
Asserts that the expression is true
debug_assert_false
This is a debug-only variant of the assert_false macro
debug_assert_ge
This is a debug-only variant of the assert_ge macro
debug_assert_gt
This is a debug-only variant of the assert_gt macro
debug_assert_le
This is a debug-only variant of the assert_le macro
debug_assert_lt
This is a debug-only variant of the assert_lt macro
debug_assert_near
This is a debug-only variant of the assert_near macro
debug_assert_nrange
This is a debug-only variant of the assert_nrange macro
debug_assert_range
This is a debug-only variant of the assert_range macro
debug_assert_true
This is a debug-only variant of the assert_true macro