diff --git a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/TypeOpsTest.kt b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/TypeOpsTest.kt index f46023a7bc..f4c9a2333a 100644 --- a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/TypeOpsTest.kt +++ b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/TypeOpsTest.kt @@ -8,7 +8,6 @@ import io.kotest.core.spec.style.FunSpec import io.kotest.matchers.collections.shouldContainExactly import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder import io.kotest.property.Arb -import io.kotest.property.arbitrary.arbitrary import io.kotest.property.arbitrary.map import io.kotest.property.arbitrary.shuffle import io.kotest.property.checkAll @@ -25,11 +24,7 @@ class TypeOpsTest : FunSpec({ // for any permutation of input, the output should be the same suspend fun checkMostSpecific(input: List, output: List) { - fun shuffleOld(list: List) = arbitrary { - list.shuffled(it.random) - } - - checkAll(shuffleOld(input)) { ts -> + checkAll(Arb.shuffle(input)) { ts -> TypeOps.mostSpecific(ts).shouldContainExactlyInAnyOrder(output) } }