assertk icon indicating copy to clipboard operation
assertk copied to clipboard

Add is(Not)SameInstanceAs assertions

Open dzirbel opened this issue 3 years ago • 0 comments

I'd like to have assertions for whether an object is the same instance (or not) as another; this can be helpful for example in situations where you want to ensure extraneous objects aren't being allocated. Google Truth provides this as a base assertion where I found it helpful in the past.

I have an implementation which works for me, but I think it's sufficiently general to consider including in the library. I'd be happy to put up a PR but wanted to check what the team thinks first.

dzirbel avatar Mar 18 '22 22:03 dzirbel