toBeLessThanOrEqualTo
context(assertionScope: AssertionScope)
infix fun <Element : Comparable<Element>> Expect<Element>.toBeLessThanOrEqualTo(expected: Element)(source)
infix fun <Element : Comparable<Element>> Expect<Element>.toBeLessThanOrEqualTo(expected: Element)(source)
Asserts that the exposed value is less than or equal to the expected value.
The exposed value must implement Comparable and be comparable with the expected value. Uses the natural ordering defined by the type's compareTo function.
Receiver
The Expect instance whose value will be compared.
Context Parameters
assertionScope
The assertion scope that will consume the assertion result.
Parameters
expected
The upper bound value (inclusive).
Type Parameters
Element
The comparable type of both the exposed value and the expected value.