Expectation::toBeBetween
Member of Expectation
idl
Expectation.toBeBetween, low, high, $
/_expect_failure, $
/exclusiveVerifies that the expectation value is between a low and high number. The range is inclusive unless EXCLUSIVE is set. If the value is an array, every element must be in range.
Examples
idl
(it.expects(50)).toBeBetween, 0, 100
(it.expects(100))._not_.toBeBetween, 0, 100, /exclusiveArguments
low
requiredinputtype=NumberSpecify the lower bound as a numeric scalar.
high
requiredinputtype=NumberSpecify the upper bound as a numeric scalar. Must be greater than or equal to low.
Keywords
_expect_failure {#kw-_expect_failure}
optionalinputtype=BooleanIf the test fails for some reason, set this to force passing because we expected failure. This keyword is for internal use only.
exclusive
optionalinputtype=BooleanIf set, values equal to low or high are not in range.