
jvmMain.io.kotest.assertions.arrow.option.matchers.kt Maven / Gradle / Ivy
package io.kotest.assertions.arrow.option
import arrow.core.None
import arrow.core.Option
import arrow.core.Some
import io.kotest.matchers.Matcher
import io.kotest.matchers.MatcherResult
import io.kotest.matchers.should
import io.kotest.matchers.shouldNot
import kotlin.contracts.ExperimentalContracts
import kotlin.contracts.contract
@OptIn(ExperimentalContracts::class)
fun Option<*>.shouldBeSome() {
contract {
returns() implies (this@shouldBeSome is Some<*>)
}
this should beSome()
}
fun beSome() = object : Matcher
© 2015 - 2025 Weber Informatics LLC | Privacy Policy