Klitos Kyriacou
10/03/2023, 4:25 PMcheckAll
with arrays?
class TestUsingCheckAllWithArray : FreeSpec({
"test" {
checkAll<Array<String>> {
// whatever
}
}
})
This produces:
java.lang.IllegalStateException: Could not locate a primary constructor for kotlin.Array
at io.kotest.property.arbitrary.JvmbindKt.forClassUsingConstructor(jvmbind.kt:84)
at io.kotest.property.arbitrary.TargetDefaultForClassNameKt.targetDefaultForType(targetDefaultForClassName.kt:73)
at io.kotest.property.resolution.JvmArbResolver.resolve(platformArbResolver.kt:11)
at io.kotest.property.resolution.ResolveKt.resolve(resolve.kt:28)
at TestUsingCheckAllWithArray$1$1.invokeSuspend(MyTest.kt:34)
checkAll<List<String>> {
val array = it.toTypedArray()
foo(array) shouldBe ...
}
But it would be nice if it worked with Array directly.sam
10/04/2023, 12:52 AMSeongil Kim
10/28/2023, 5:55 AM