doc / ch.tutteli.atrium.api.infix.en_GB / isSameAs

isSameAs

infix fun <T> Expect<T>.isSameAs(expected: T): Expect<T> (source)
Deprecated: Use toBeTheInstance; will be removed with 1.0.0 at the latest

Expects that the subject of this expectation is the same instance as expected.

val list = listOf(3)
expect(list) isSameAs list

fails {
    expect(listOf(3)) isSameAs listOf(3) // fails because isSameAs is based on identity, use toBe for equality
}

Return
an Expect for the subject of this expectation.