
commonMain.io.kotest.matchers.longs.multipleOf.kt Maven / Gradle / Ivy
package io.kotest.matchers.longs
import io.kotest.matchers.Matcher
import io.kotest.matchers.MatcherResult
import io.kotest.matchers.should
infix fun Long?.shouldBeMultipleOf(other: Long) = this should beMultipleOf(other)
fun beMultipleOf(other: Long) = Matcher { value ->
MatcherResult(
value != null && value % other == 0L,
{ "${value} should be multiple of ${other}" },
{ "${value} should not be multiple of ${other}" }
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy