kotest-assertions / io.kotest.assertions.eq

Package io.kotest.assertions.eq

Types

Eq

A Eq typeclass compares two values for equality, returning an AssertionError if they are not equal, or null if they are equal.

interface Eq<T>

NumberEq

object NumberEq : Eq<Number>

StringEq

An Eq implementation for String's that generates diffs for errors when the string inputs are of a certain size. The min size for the diff is retrieved by largeStringDiffMinSize.

object StringEq : Eq<String>

ThrowableEq

object ThrowableEq : Eq<Throwable>

Functions

eq

Locates the applicable Eq for the inputs, and invokes it, returning the error if any.

fun <T> eq(actual: T, expected: T): Throwable?

escapeLineBreaks

fun escapeLineBreaks(input: String): String

largeStringDiffMinSize

fun largeStringDiffMinSize(): Int