Skip to content

Ensure custom KProperty include the name in the hashcode #1710

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

Merged
merged 3 commits into from
May 19, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Spotless update
  • Loading branch information
rozza committed May 12, 2025
commit b345e4bba99b47bfce7aada26160f8bfb74b21fa
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,13 @@ class KPropertiesTest {
fun testNoCacheCollisions() {
for (i in 1.rangeTo(25_000)) {
assertEquals("reviews.$i", Restaurant::reviews.pos(i).path())
assertEquals("reviews.$[identifier$i]", Restaurant::reviews.filteredPosOp("identifier$i").path())
assertEquals("reviews.$[identifier$i]", Restaurant::reviews.filteredPosOp("identifier$i").path())
assertEquals("localeMap.$i", Restaurant::localeMap.keyProjection(i).path())

val x = i / 2
assertEquals("reviews.$[identifier$x].rating", (Restaurant::reviews.filteredPosOp("identifier$x") / Review::score).path())
assertEquals(
"reviews.$[identifier$x].rating",
(Restaurant::reviews.filteredPosOp("identifier$x") / Review::score).path())
assertEquals("reviews.$x.rating", (Restaurant::reviews.pos(x) / Review::score).path())
assertEquals("localeMap.$x.rating", (Restaurant::localeMap.keyProjection(x) / Review::score).path())
}
Expand Down