Skip to content

Use AssertK helper to check toString#19

Merged
saket merged 1 commit into
saket:trunkfrom
JakeWharton:jw.to-string-fun.2026-03-16
Mar 16, 2026
Merged

Use AssertK helper to check toString#19
saket merged 1 commit into
saket:trunkfrom
JakeWharton:jw.to-string-fun.2026-03-16

Conversation

@JakeWharton

Copy link
Copy Markdown
Contributor

No description provided.

// todo: find a better way that does not involve comparing their formatted strings
this.transform { it.toString() }
.isEqualTo(other.toString())
toStringFun().isEqualTo(other.toString())

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL, thank you!

@saket saket merged commit a91147b into saket:trunk Mar 16, 2026
2 checks passed
// todo: find a better way that does not involve comparing their formatted strings
this.transform { it.toString() }
.isEqualTo(other.toString())
toStringFun().isEqualTo(other.toString())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
toStringFun().isEqualTo(other.toString())
hasToString(other.toString())

There is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants