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

shouldBeLessThan

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

Verifies that this is less than other

Opposite of shouldNotBeLessThan

This function will check for the result of Comparable.compareTo and result accordingly. This will pass if the value is less than other (compareTo returns < 0).

See Also

shouldNotBeLessThan

shouldBeLessThanOrEqualTo