← Docs
kotlin.test / kotlin.test / DefaultAsserter

DefaultAsserter

Common
JVM
JS
Native
1.0
object DefaultAsserter : Asserter
(source)

Default Asserter implementation to avoid dependency on JUnit or TestNG.

Functions

Common
JVM
JS
Native
1.0

fail

Fails the current test with the specified message.

fun fail ( message : String ? ) : Nothing

Fails the current test with the specified message and cause exception.

fun fail ( message : String ? , cause : Throwable ? ) : Nothing
Stay in touch:
  • Contributing to Kotlin
  • Releases
  • Press Kit
  • Security
  • Blog
  • Issue Tracker
  • Brand assets
  • Careers
Supported and developed by JetBrains .
Kotlin™ is protected under the Kotlin Foundation
and licensed under the Apache 2 license .