Skip to content

Commit

Permalink
Add test for hash of symbolic expressions involving equivalent numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
bowenszhu committed Nov 27, 2024
1 parent 1672b2f commit d716d3b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/hash_consing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,7 @@ end
f = 0.5
r = 1 // 2
@test hash(f) == hash(r)
@test hash2(f) != hash2(r)
u0 = zero(UInt)
@test hash2(f, u0) != hash2(r, u0)
@test f + a !== r + a
end

0 comments on commit d716d3b

Please sign in to comment.