File tree 7 files changed +25
-19
lines changed
src/main/kotlin/io/kotest/plugin/pitest
7 files changed +25
-19
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,11 @@ Please create issues on the main kotest [board](https://github.com/kotest/kotest
14
14
15
15
## Changelog
16
16
17
+ ### 1.2.0
18
+
19
+ * Minimum Pitest version is now 1.9.0.
20
+ * Confirmed to work with Pitest versions up to and including 1.11.0
21
+
17
22
### 1.1.0
18
23
19
24
* Updated for Kotest 5.x. Now requires Kotlin 1.6
Original file line number Diff line number Diff line change 1
1
[versions ]
2
2
kotest = " 5.5.4"
3
- pitest = " 1.8 .0"
3
+ pitest = " 1.11 .0"
4
4
coroutines = " 1.6.4"
5
5
6
6
[libraries ]
Original file line number Diff line number Diff line change @@ -8,10 +8,9 @@ import java.util.Optional
8
8
9
9
class KotestConfiguration : Configuration {
10
10
11
- override fun verifyEnvironment (): Optional <PitHelpError > = Optional .empty()
11
+ override fun verifyEnvironment (): Optional <PitHelpError > = Optional .empty()
12
12
13
- override fun testUnitFinder (): TestUnitFinder = KotestUnitFinder ()
14
-
15
- override fun testSuiteFinder (): TestSuiteFinder = KotestSuiteFinder ()
13
+ override fun testUnitFinder (): TestUnitFinder = KotestUnitFinder ()
16
14
15
+ override fun testSuiteFinder (): TestSuiteFinder = KotestSuiteFinder ()
17
16
}
Original file line number Diff line number Diff line change @@ -6,13 +6,15 @@ import org.pitest.testapi.TestGroupConfig
6
6
import org.pitest.testapi.TestPluginFactory
7
7
8
8
class KotestPluginFactory : TestPluginFactory {
9
- override fun createTestFrameworkConfiguration (config : TestGroupConfig ? ,
10
- source : ClassByteArraySource ? ,
11
- excludedRunners : MutableCollection <String >? ,
12
- includedTestMethods : MutableCollection <String >? ): Configuration {
13
- return KotestConfiguration ()
14
- }
9
+ override fun createTestFrameworkConfiguration (
10
+ config : TestGroupConfig ? ,
11
+ source : ClassByteArraySource ? ,
12
+ excludedRunners : MutableCollection <String >? ,
13
+ includedTestMethods : MutableCollection <String >?
14
+ ): Configuration {
15
+ return KotestConfiguration ()
16
+ }
15
17
16
- override fun description (): String = " Kotest Support"
17
- override fun name (): String = " Kotest"
18
- }
18
+ override fun description (): String = " Kotest Support"
19
+ override fun name (): String = " Kotest"
20
+ }
Original file line number Diff line number Diff line change @@ -3,5 +3,5 @@ package io.kotest.plugin.pitest
3
3
import org.pitest.testapi.TestSuiteFinder
4
4
5
5
class KotestSuiteFinder : TestSuiteFinder {
6
- override fun apply (t : Class <* >? ): MutableList <Class <* >> = mutableListOf ()
6
+ override fun apply (t : Class <* >? ): MutableList <Class <* >> = mutableListOf ()
7
7
}
Original file line number Diff line number Diff line change @@ -17,15 +17,15 @@ class KotestUnit(val klass: KClass<out Spec>) : TestUnit {
17
17
override fun getDescription (): Description = Description (klass.toDescriptor().path().value, klass.java)
18
18
19
19
override fun execute (rc : ResultCollector ) = runBlocking<Unit > {
20
-
21
20
val listener = object : AbstractTestEngineListener () {
22
21
23
22
private val started = mutableSetOf< io.kotest.core.descriptors.Descriptor .TestDescriptor > ()
24
23
private val completed = mutableSetOf< io.kotest.core.descriptors.Descriptor .TestDescriptor > ()
25
24
26
25
override suspend fun testStarted (testCase : TestCase ) {
27
- if (started.add(testCase.descriptor))
26
+ if (started.add(testCase.descriptor)) {
28
27
rc.notifyStart(Description (testCase.descriptor.path().value, klass.java))
28
+ }
29
29
}
30
30
31
31
override suspend fun testFinished (testCase : TestCase , result : TestResult ) {
Original file line number Diff line number Diff line change @@ -2,13 +2,13 @@ package io.kotest.plugin.pitest
2
2
3
3
import io.kotest.core.spec.Spec
4
4
import org.pitest.testapi.TestUnit
5
+ import org.pitest.testapi.TestUnitExecutionListener
5
6
import org.pitest.testapi.TestUnitFinder
6
7
import kotlin.reflect.KClass
7
8
8
9
class KotestUnitFinder : TestUnitFinder {
9
10
10
- @Suppress(" UNCHECKED_CAST" )
11
- override fun findTestUnits (clazz : Class <* >): MutableList <TestUnit > {
11
+ override fun findTestUnits (clazz : Class <* >, listener : TestUnitExecutionListener ? ): MutableList <TestUnit > {
12
12
return when {
13
13
Spec ::class .java.isAssignableFrom(clazz) -> mutableListOf (KotestUnit (clazz.kotlin as KClass <out Spec >))
14
14
else -> mutableListOf ()
You can’t perform that action at this time.
0 commit comments