kotest-assertions-core / io.kotest.matchers.comparables / shouldNotBeGreaterThan

shouldNotBeGreaterThan

infix fun <T : Comparable<T>> T.shouldNotBeGreaterThan(other: T): Unit

Verifies that this is NOT greater than other

Opposite of shouldBeGreaterThan

This function will check for the result of Comparable.compareTo and result accordingly. This will pass if the value is NOT greater than other (compareTo doesn't return > 0).

See Also

shouldBeGreaterThan

shouldNotBeGreaterThanOrEqualTo