All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.mockk.InternalPlatformDsl.kt Maven / Gradle / Ivy

package io.mockk

import kotlin.coroutines.experimental.Continuation

expect object InternalPlatformDsl {
    fun identityHashCode(obj: Any): Int

    fun  runCoroutine(block: suspend () -> T): T

    fun Any?.toStr(): String

    fun deepEquals(obj1: Any?, obj2: Any?): Boolean

    fun unboxChar(value: Any): Any

    fun Any.toArray(): Array<*>

    fun classForName(name: String): Any

    fun dynamicCall(
        self: Any,
        methodName: String,
        args: Array,
        anyContinuationGen: () -> Continuation<*>
    ): Any?

    fun dynamicGet(self: Any, name: String): Any?

    fun dynamicSet(self: Any, name: String, value: Any?)

    fun dynamicSetField(self: Any, name: String, value: Any?)

    fun  threadLocal(initializer: () -> T): InternalRef

    fun counter(): InternalCounter

    fun  coroutineCall(lambda: suspend () -> T): CoroutineCall
}

interface CoroutineCall {
    fun callWithContinuation(continuation: Continuation<*>): T
}

interface InternalRef {
    val value: T
}


interface InternalCounter {
    val value: Long

    fun increment(): Long
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy