Skip to content
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

shouldBeEqualToComparingFields handles arrays and computed properties #2475

Merged
merged 3 commits into from
Sep 10, 2021

Conversation

Kantis
Copy link
Member

@Kantis Kantis commented Sep 8, 2021

Should fix #2375

I didn't quite get the part regarding bridge modifier from the issue discussion. What kind of construct is required to create a bridge field?

TODO:

  • update changelog?
  • update relevant docs

"${it.name}: ${actual.show().value} != ${expected.show().value}"
}

val isEqual = eq(actual, expected) == null
Copy link
Member Author

Choose a reason for hiding this comment

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

Using eq gives us handling of arrays for free.. could it cause other problems? It feels like a nice way to delegate responsibility of equality, IMO

Copy link
Contributor

Choose a reason for hiding this comment

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

Using eq will be okay, I don't see any problem using it.

@Kantis Kantis marked this pull request as ready for review September 9, 2021 19:38
@sksamuel
Copy link
Member

Should fix #2375

I didn't quite get the part regarding bridge modifier from the issue discussion. What kind of construct is required to create a bridge field?

Bridge and synthetic methods are added by the compiler. So we should just ignore those (if they even show up).

@sksamuel
Copy link
Member

Don't need to worry about changelog for bugs - I will compile a full list of fixed bugs when I release the next version.
It's good to add details to the changelog / docs for new features tho.

@sksamuel sksamuel merged commit 8090b5a into kotest:master Sep 10, 2021
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.

Improvement of equality.reflection assertions
3 participants