Assertions for >, <, /=, and within range (i.e. x < y < z)
I have now frequently enough needed to check that a value is within some expected range. We should have the following assertions for that.
-
assert_less_than(expected_max, actual)(maybe alsoassert_less_than_or_equal_to(expected, actual)) -
assert_greater_than(expected_max, actual)(maybe alsoassert_greater_than_or_equal_to(expected, actual)) -
assert_within_exclusive(lower_bound, upper_bound, actual),assert_within_inclusive,assert_within_lower_inclusive, andassert_within_upper_inclusive - and for good measure
assert_not_equals(not_expected, actual)
While adding these, might as well add assert_equals for logicals