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

commonMain.korlibs.test.truth.kt Maven / Gradle / Ivy

The newest version!
package korlibs.test

import kotlin.test.*

fun assertThat(actual: Double) = DoubleSubject(actual)
fun assertThat(actual: Boolean) = BooleanSubject(actual)
fun  assertThat(actual: T) = AnySubject(actual)
fun  assertThat(actual: Collection) = CollectionSubject(actual)
inline fun  assertThat(actual: Map) = MapSubject(actual)

fun testAssertFailsWithMessage(expectedErrorMessage: String, block: () -> Unit) {
    try {
        block()
    } catch (assertionError: AssertionError) {
        assertEquals(expectedErrorMessage, assertionError.message)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy