
commonMain.io.kotest.properties.PropertyTestingForAll.kt Maven / Gradle / Ivy
package io.kotest.properties
import io.kotest.matchers.shouldBe
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
inline fun forAll(noinline fn: PropertyContext.(a: A) -> Boolean) = forAll(1000, fn)
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
inline fun forAll(iterations: Int, noinline fn: PropertyContext.(a: A) -> Boolean) {
forAll(iterations, Gen.default(), fn)
}
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
fun forAll(gena: Gen, fn: PropertyContext.(a: A) -> Boolean) = forAll(1000, gena, fn)
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
fun Gen.forAll(iterations: Int = 1000, fn: PropertyContext.(a0: A) -> Boolean) = forAll(iterations, this, fn)
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
fun Gen.forAll(iterations: Int = 1000, fn: PropertyContext.(a0: A, a1: A) -> Boolean) = forAll(iterations, this, this, fn)
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
fun Gen.forAll(iterations: Int = 1000, fn: PropertyContext.(a0: A, a1: A, a2: A) -> Boolean) = forAll(iterations, this, this, this, fn)
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
fun Gen.forAll(iterations: Int = 1000, fn: PropertyContext.(a0: A, a1: A, a2: A, a3: A) -> Boolean) = forAll(iterations, this, this, this, this, fn)
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
fun Gen.forAll(iterations: Int = 1000, fn: PropertyContext.(a0: A, a1: A, a2: A, a3: A, a4: A) -> Boolean) = forAll(iterations, this, this, this, this, this, fn)
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
fun Gen.forAll(iterations: Int = 1000, fn: PropertyContext.(a0: A, a1: A, a2: A, a3: A, a4: A, a5: A) -> Boolean) = forAll(iterations, this, this, this, this, this, this, fn)
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
fun forAll(iterations: Int, gena: Gen, fn: PropertyContext.(a: A) -> Boolean) {
assertAll(iterations, gena) { a ->
fn(a) shouldBe true
}
}
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
inline fun forAll(noinline fn: PropertyContext.(a: A, b: B) -> Boolean) = forAll(1000, fn)
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
inline fun forAll(iterations: Int, noinline fn: PropertyContext.(a: A, b: B) -> Boolean) {
forAll(iterations, Gen.default(), Gen.default(), fn)
}
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
fun forAll(gena: Gen, genb: Gen, fn: PropertyContext.(a: A, b: B) -> Boolean) = forAll(1000, gena, genb, fn)
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
fun forAll(iterations: Int, gena: Gen, genb: Gen, fn: PropertyContext.(a: A, b: B) -> Boolean) {
assertAll(iterations, gena, genb) { a, b ->
fn(a, b) shouldBe true
}
}
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
inline fun forAll(noinline fn: PropertyContext.(a: A, b: B, c: C) -> Boolean) = forAll(1000, fn)
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
inline fun forAll(iterations: Int, noinline fn: PropertyContext.(a: A, b: B, c: C) -> Boolean) {
forAll(iterations, Gen.default(), Gen.default(), Gen.default(), fn)
}
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
fun forAll(gena: Gen, genb: Gen, genc: Gen, fn: PropertyContext.(a: A, b: B, c: C) -> Boolean) =
forAll(1000, gena, genb, genc, fn)
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
fun forAll(iterations: Int, gena: Gen, genb: Gen, genc: Gen, fn: PropertyContext.(a: A, b: B, c: C) -> Boolean) {
assertAll(iterations, gena, genb, genc) { a, b, c ->
fn(a, b, c) shouldBe true
}
}
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
inline fun forAll(noinline fn: PropertyContext.(a: A, b: B, c: C, D) -> Boolean) {
forAll(1000, fn)
}
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
inline fun forAll(iterations: Int, noinline fn: PropertyContext.(a: A, b: B, c: C, D) -> Boolean) {
forAll(iterations, Gen.default(), Gen.default(), Gen.default(), Gen.default(), fn)
}
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
fun forAll(gena: Gen, genb: Gen, genc: Gen, gend: Gen, fn: PropertyContext.(a: A, b: B, c: C, d: D) -> Boolean) =
forAll(1000, gena, genb, genc, gend, fn)
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
fun forAll(iterations: Int, gena: Gen, genb: Gen, genc: Gen, gend: Gen, fn: PropertyContext.(a: A, b: B, c: C, d: D) -> Boolean) {
assertAll(iterations, gena, genb, genc, gend) { a, b, c, d ->
fn(a, b, c, d) shouldBe true
}
}
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
inline fun forAll(noinline fn: PropertyContext.(a: A, b: B, c: C, d: D, e: E) -> Boolean) {
forAll(Gen.default(), Gen.default(), Gen.default(), Gen.default(), Gen.default(), fn)
}
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
inline fun forAll(iterations: Int, noinline fn: PropertyContext.(a: A, b: B, c: C, d: D, e: E) -> Boolean) {
forAll(iterations, Gen.default(), Gen.default(), Gen.default(), Gen.default(), Gen.default(), fn)
}
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
fun forAll(gena: Gen, genb: Gen, genc: Gen, gend: Gen, gene: Gen, fn: PropertyContext.(a: A, b: B, c: C, d: D, e: E) -> Boolean) =
forAll(1000, gena, genb, genc, gend, gene, fn)
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
fun forAll(iterations: Int, gena: Gen, genb: Gen, genc: Gen, gend: Gen, gene: Gen, fn: PropertyContext.(a: A, b: B, c: C, d: D, e: E) -> Boolean) {
assertAll(iterations, gena, genb, genc, gend, gene) { a, b, c, d, e ->
fn(a, b, c, d, e) shouldBe true
}
}
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
inline fun forAll(noinline fn: PropertyContext.(a: A, b: B, c: C, d: D, e: E, f: F) -> Boolean) {
forAll(1000, fn)
}
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
inline fun forAll(iterations: Int, noinline fn: PropertyContext.(a: A, b: B, c: C, d: D, e: E, f: F) -> Boolean) {
forAll(iterations, Gen.default(), Gen.default(), Gen.default(), Gen.default(), Gen.default(), Gen.default(), fn)
}
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
fun forAll(gena: Gen, genb: Gen, genc: Gen, gend: Gen, gene: Gen, genf: Gen,
fn: PropertyContext.(a: A, b: B, c: C, d: D, e: E, f: F) -> Boolean) =
forAll(1000, gena, genb, genc, gend, gene, genf, fn)
@Deprecated("Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0")
fun forAll(iterations: Int, gena: Gen, genb: Gen, genc: Gen, gend: Gen, gene: Gen, genf: Gen,
fn: PropertyContext.(a: A, b: B, c: C, d: D, e: E, f: F) -> Boolean) {
assertAll(iterations, gena, genb, genc, gend, gene, genf) { a, b, c, d, e, f ->
fn(a, b, c, d, e, f) shouldBe true
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy