willowtreeapps / assertk

assertions for kotlin inspired by assertj
MIT License
757 stars 84 forks source link

Rename isSameAs/isNotSameAs to isSameInstanceAs/isNotSameInstanceAs #496

Closed evant closed 9 months ago

evant commented 9 months ago

This makes it more clear these functions are about instance identity see: https://truth.dev/comparison

495

evant commented 9 months ago

The implementation is

fun <T> Assert<T>.isSameAs(expected: T) = isSameInstanceAs(expected)

so I don't think it's that important

JakeWharton commented 9 months ago

The implementation is

fun <T> Assert<T>.isSameAs(expected: T) = isSameInstanceAs(expected)

so I don't think it's that important

I thought in the past you wanted me to keep tests for the old APIs, but it's absolutely possible I'm confusing this with other projects. I, too, think it's reasonable to omit.

evant commented 9 months ago

The implementation is

fun <T> Assert<T>.isSameAs(expected: T) = isSameInstanceAs(expected)

so I don't think it's that important

I thought in the past you wanted me to keep tests for the old APIs, but it's absolutely possible I'm confusing this with other projects. I, too, think it's reasonable to omit.

Depends on what it was testing, anything more complicated than forwarding to a function which already has a test I would say to keep, yeah