Skip to content

Commit 96855a8

Browse files
committed
Clean up
1 parent b38df97 commit 96855a8

File tree

1 file changed

+5
-5
lines changed
  • test-kotlin/test-utils/src/com/intellij/rt/coverage

1 file changed

+5
-5
lines changed

test-kotlin/test-utils/src/com/intellij/rt/coverage/runner.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import com.intellij.rt.coverage.util.CoverageRunner
2424
import com.intellij.rt.coverage.util.ResourceUtil
2525
import org.junit.Assert
2626
import java.io.File
27-
import kotlin.reflect.KMutableProperty
27+
import kotlin.reflect.KMutableProperty0
2828

2929

3030
abstract class TestResult {
@@ -156,13 +156,13 @@ internal fun runWithCoverage(
156156
.also { assertEmptyLogFile(coverageDataFile) }
157157
}
158158

159-
inline fun runWithOptions(values: Map<KMutableProperty<Boolean>, Boolean>, action: () -> Unit) {
160-
val originalValues = values.mapValues { it.key.getter.call() }
161-
values.forEach { (field, value) -> field.setter.call(value) }
159+
inline fun runWithOptions(values: Map<KMutableProperty0<Boolean>, Boolean>, action: () -> Unit) {
160+
val originalValues = values.mapValues { it.key.get() }
161+
values.forEach { (field, value) -> field.set(value) }
162162
try {
163163
action()
164164
} finally {
165-
originalValues.forEach { (field, value) -> field.setter.call(value) }
165+
originalValues.forEach { (field, value) -> field.set(value) }
166166
}
167167
}
168168

0 commit comments

Comments
 (0)