LensLaws

object LensLaws

Functions

Link copied to clipboard
fun <A, B> laws(    lens: Lens<A, B>,     aGen: Arb<A>,     bGen: Arb<B>,     funcGen: Arb<(B) -> B>,     eqa: (A, A) -> Boolean = { a, b -> a == b },     eqb: (B, B) -> Boolean = { a, b -> a == b }): List<Law>

Warning: Use only when a Gen.constant() applies

fun <A, B> laws(    lensGen: Arb<Lens<A, B>>,     aGen: Arb<A>,     bGen: Arb<B>,     funcGen: Arb<(B) -> B>,     eqa: (A, A) -> Boolean = { a, b -> a == b },     eqb: (B, B) -> Boolean = { a, b -> a == b }): List<Law>
Link copied to clipboard
suspend fun <A, B> lensComposeModify(    lensGen: Arb<Lens<A, B>>,     aGen: Arb<A>,     funcGen: Arb<(B) -> B>,     eq: (A, A) -> Boolean): PropertyContext
Link copied to clipboard
suspend fun <A, B> lensConsistentSetModify(    lensGen: Arb<Lens<A, B>>,     aGen: Arb<A>,     bGen: Arb<B>,     eq: (A, A) -> Boolean): PropertyContext
Link copied to clipboard
suspend fun <A, B> lensGetSet(    lensGen: Arb<Lens<A, B>>,     aGen: Arb<A>,     eq: (A, A) -> Boolean): PropertyContext
Link copied to clipboard
suspend fun <A, B> lensModifyIdentity(    lensGen: Arb<Lens<A, B>>,     aGen: Arb<A>,     eq: (A, A) -> Boolean): PropertyContext
Link copied to clipboard
suspend fun <A, B> lensSetGet(    lensGen: Arb<Lens<A, B>>,     aGen: Arb<A>,     bGen: Arb<B>,     eq: (B, B) -> Boolean): PropertyContext
Link copied to clipboard
suspend fun <A, B> lensSetIdempotent(    lensGen: Arb<Lens<A, B>>,     aGen: Arb<A>,     bGen: Arb<B>,     eq: (A, A) -> Boolean): PropertyContext