Skip to content

Commit

Permalink
stricter test
Browse files Browse the repository at this point in the history
  • Loading branch information
nsajko authored Feb 6, 2025
1 parent a0ffe3f commit 2fa95b7
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions test/tuple.jl
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,15 @@ end
@test hash((), UInt(0)) != hash((), UInt(1))
@test hash((3,), UInt(0)) != hash((3,), UInt(1))
let (x, y, z) = (1, 3, 7)
h = UInt(9)
@test hash((x, y, (z,)), h) != hash((x, (y, z)), h)
@test hash(((x,), y, z), h) != hash(((x, y), z), h)
xyzs = (
(x, y, z),
((x,), y, z),
(x, (y,), z),
(x, y, (z,)),
(x, (y, z)),
((x, y), z),
)
@test allunique(hash, xyzs)
end
end

Expand Down

0 comments on commit 2fa95b7

Please sign in to comment.