-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
show diff for equals assertions. #76
Comments
also related to #74 |
here's documentation for some of the smart things scalatest does with assert: https://www.scalatest.org/user_guide/using_assertions |
Yes, I do think this is related to #45. One of the benefits we would get from that ticket is the ability to have much more complex diagram logic. Being able to include diffs for equalities of strings and collections, being able to compress the diagram slightly when display strings don't overlap or just have a much more rich diagram, custom behavior specific to individual assertion libraries, etc. There's a lot of benefits and this is something I'd like to tackle next for this library. For now, I'll leave this ticket up so I remember to add this specific use case, but I suspect it will get implemented alongside #45. |
Ticket has been moved to Kotlin YouTrack: https://youtrack.jetbrains.com/issue/KT-66806 |
scalatest and zio test power assert both have this nice feature:
when you write assert("xxx" == "yyy") this is recognized as a comparision and it shows a diff when it fails.
I'm not sure whats the best way to implement that, but maybe it should be implemented not in the compiler plugin but in a support lib, the compiler plugin would just supply the metadata (ast?) to make it possible to find and special case the equals method. (related to #45)
The text was updated successfully, but these errors were encountered: