mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
testFramework: provide String overload for Registry.withValue
(cherry picked from commit 11d21d3c52bfa544f58b0f4f191eb0b2a282b424) GitOrigin-RevId: e41853fc1ec1cedd981bb8d4c139635bc1de6e39
This commit is contained in:
committed by
intellij-monorepo-bot
parent
84d4c0c25e
commit
1a76eabbc0
@@ -11,4 +11,15 @@ inline fun RegistryValue.withValue(tempValue: Boolean, crossinline block: () ->
|
||||
finally {
|
||||
setValue(currentValue)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inline fun RegistryValue.withValue(tempValue: String, crossinline block: () -> Unit) {
|
||||
val currentValue = asBoolean()
|
||||
try {
|
||||
setValue(tempValue)
|
||||
block()
|
||||
}
|
||||
finally {
|
||||
setValue(currentValue)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user