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

commonMain.io.kotest.assertions.eq.ThrowableEq.kt Maven / Gradle / Ivy

package io.kotest.assertions.eq

import io.kotest.assertions.failure
import io.kotest.assertions.show.show

object ThrowableEq : Eq {
   override fun equals(actual: Throwable, expected: Throwable): Throwable? {
      return if (actual.message == expected.message && expected::class == actual::class)
         null
      else
         failure(expected.show(), actual.show())
   }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy