assertSame

fun <T> assertSame(expected: T, actual: T, message: String? = null)(source)

Asserts that expected is the same instance as actual, with an optional message.

Since Kotlin

1.0

fun <T> assertSame(expected: T, actual: T, lazyMessage: () -> String)(source)

Asserts that expected is the same instance as actual, with an error message generated by the lazyMessage lambda otherwise.

Since Kotlin

2.4