testFramework: fix wrong type in RegistryValue.withValue

it was inspired by the other overload and there was no
check that the value set after is identical to the
original one

(cherry picked from commit fbeb49678b2af7c3356df740b5d7f98bef380550)

GitOrigin-RevId: c7252a000301e90c4ad4f0df08612ce1b6a0fa2a
This commit is contained in:
Evgenii Novozhilov
2025-02-11 13:57:15 +02:00
committed by intellij-monorepo-bot
parent 1a76eabbc0
commit 69e0ecef4c

View File

@@ -14,7 +14,7 @@ inline fun RegistryValue.withValue(tempValue: Boolean, crossinline block: () ->
} }
inline fun RegistryValue.withValue(tempValue: String, crossinline block: () -> Unit) { inline fun RegistryValue.withValue(tempValue: String, crossinline block: () -> Unit) {
val currentValue = asBoolean() val currentValue = asString()
try { try {
setValue(tempValue) setValue(tempValue)
block() block()