commonMain.io.mockk.impl.log.SafeToString.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mockk-jvm Show documentation
Show all versions of mockk-jvm Show documentation
Mocking library for Kotlin
package io.mockk.impl.log
import io.mockk.impl.recording.CommonCallRecorder
class SafeToString(val callrecorderGetter: () -> CommonCallRecorder) {
operator fun invoke(logger: Logger): Logger = SafeLogger(logger, callrecorderGetter)
fun exec(block: () -> T): T = callrecorderGetter().safeExec(block)
}