v1.8.10
  • Solutions
    • Multiplatform
    • Server-side
    • Data science
    • Android
  • Docs
  • Community
  • Teach
  • Play
    • Playground
    • Hands-on
    • Examples
    • Koans
← 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
Kotlin™ is protected under the Kotlin Foundation and licensed under the Apache 2 license.
Supported and developed by JetBrains