kotest-property / io.kotest.property.arbitrary / multiples

multiples

fun Arb.Companion.multiples(k: Int, max: Int): Arb<Int>

Returns an Arb where each generated value is a multiple of k between 0 to the specified max.

The edge cases are 0, since 0 is a multiple of every integer.

This arbitrary uses a Shrinker which will reduce the size of a failing value by removing factors of k until 0 is hit.