Skip to content

Commit

Permalink
Fixed regression on data test api
Browse files Browse the repository at this point in the history
  • Loading branch information
sksamuel committed Dec 13, 2020
1 parent 778940a commit edc430f
Showing 1 changed file with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ import io.kotest.assertions.failure
import io.kotest.core.spec.style.scopes.ContainerScope
import io.kotest.core.test.createTestName

@Deprecated("Use ContainerScope.forAll(vararg Pair<String, T>) or ContainerScope.forAll(List<Pair<String, T>>). Will be removed in 4.6")
suspend fun <T> ContainerScope.forAll(first: Pair<String, T>, vararg rest: Pair<String, T>, test: suspend (T) -> Unit) {
(listOf(first) + rest).forEach { (name, t) ->
addTest(createTestName(name), false) { test(t) }
}
}

suspend fun <T> ContainerScope.forNone(vararg data: Pair<String, T>, test: suspend (T) -> Unit) {
data.forEach { (name, t) ->
addTest(createTestName(name), false) {
Expand Down Expand Up @@ -53,15 +46,6 @@ suspend fun <T : Any> ContainerScope.forAll(vararg ts: T, test: suspend (T) -> U
}
}

@Deprecated("Use ContainerScope.forAll(vararg) or ContainerScope.forAll(list). Will be removed in 4.6")
suspend fun <T : Any> ContainerScope.forAll(first: T, vararg rest: T, test: suspend (T) -> Unit) {
val idents = Identifiers()
(listOf(first) + rest).forEach { t ->
val name = idents.stableIdentifier(t)
addTest(createTestName(name), false) { test(t) }
}
}

suspend fun <T : Any> ContainerScope.forNone(vararg data: T, test: suspend (T) -> Unit) {
val idents = Identifiers()
data.forEach { t ->
Expand Down

0 comments on commit edc430f

Please sign in to comment.