From fac6b36fb86a9b7b9e1bc5eff947de3bfdf7610e Mon Sep 17 00:00:00 2001 From: Simon Vergauwen Date: Thu, 23 Sep 2021 22:21:13 +0200 Subject: [PATCH] Bump to Kotest 5 M2 (#2536) --- .../src/commonMain/kotlin/arrow/core/test/UnitSpec.kt | 8 ++++---- arrow-libs/gradle.properties | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arrow-libs/core/arrow-core-test/src/commonMain/kotlin/arrow/core/test/UnitSpec.kt b/arrow-libs/core/arrow-core-test/src/commonMain/kotlin/arrow/core/test/UnitSpec.kt index 35c06df9ad5..a21fe3abc9f 100644 --- a/arrow-libs/core/arrow-core-test/src/commonMain/kotlin/arrow/core/test/UnitSpec.kt +++ b/arrow-libs/core/arrow-core-test/src/commonMain/kotlin/arrow/core/test/UnitSpec.kt @@ -5,8 +5,8 @@ import arrow.core.Tuple4 import arrow.core.Tuple5 import arrow.core.test.generators.unit import arrow.core.test.laws.Law +import io.kotest.core.names.TestName import io.kotest.core.spec.style.StringSpec -import io.kotest.core.test.createTestName import io.kotest.property.Arb import io.kotest.property.Gen import io.kotest.property.PropertyContext @@ -34,7 +34,7 @@ public abstract class UnitSpec( Arb.KList(gen, range) public fun Arb.Companion.nonEmptyList(arb: Arb, depth: Int = maxDepth): Arb> = - Arb.list(arb, 1..max(1, maxDepth)).filter(List::isNotEmpty).map(NonEmptyList.Companion::fromListUnsafe) + Arb.list(arb, 1..max(1, depth)).filter(List::isNotEmpty).map(NonEmptyList.Companion::fromListUnsafe) public fun Arb.Companion.sequence(arbA: Arb, range: IntRange = 0..maxDepth): Arb> = Arb.list(arbA, range).map { it.asSequence() } @@ -59,14 +59,14 @@ public abstract class UnitSpec( .flatMap { list: List -> list.asIterable() } .distinctBy { law: Law -> law.name } .forEach { law: Law -> - registration().addTest(createTestName(law.name), xdisabled = false, law.test) + registration().addTest(TestName(law.name), xdisabled = false, law.test) } public fun testLaws(prefix: String, vararg laws: List): Unit = laws .flatMap { list: List -> list.asIterable() } .distinctBy { law: Law -> law.name } .forEach { law: Law -> - registration().addTest(createTestName(prefix, law.name, true), xdisabled = false, law.test) + registration().addTest(TestName(prefix, law.name, true), xdisabled = false, law.test) } public suspend fun checkAll(property: suspend PropertyContext.() -> Unit): PropertyContext = diff --git a/arrow-libs/gradle.properties b/arrow-libs/gradle.properties index 668cad66821..72ea6284249 100644 --- a/arrow-libs/gradle.properties +++ b/arrow-libs/gradle.properties @@ -23,7 +23,7 @@ JMH_REPORT_PLUGIN_VERSION=0.9.0 JUNIT_VERSION=4.12 JUNIT_VINTAGE_VERSION=5.5.2 KINDEDJ_VERSION=1.1.0 -KOTEST_VERSION=5.0.0.M1 +KOTEST_VERSION=5.0.0.M2 KOTEST_GRADLE_VERSION=5.0.0.5 KOTLIN_POET_VERSION=1.5.0 KOTLIN_TEST_VERSION=3.3.3