5355f0f705
^KT-60924
15 lines
398 B
Kotlin
Vendored
15 lines
398 B
Kotlin
Vendored
// FIR_IDENTICAL
|
|
// SKIP_KT_DUMP
|
|
class ObjectAssert<ACTUAL> {
|
|
fun describedAs(description: String?, vararg args: Any?): ObjectAssert<ACTUAL>? = null
|
|
}
|
|
|
|
object Assertions {
|
|
fun <S> assertThat(actual: S): ObjectAssert<S> = ObjectAssert()
|
|
}
|
|
|
|
fun <T : Any> T?.assertNotNull(description: String? = null) {
|
|
val assert = Assertions.assertThat(this)
|
|
description?.let(assert::describedAs)
|
|
}
|