Skip to content

Commit d716d3b

Browse files
committed
Add test for hash of symbolic expressions involving equivalent numbers
1 parent 1672b2f commit d716d3b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/hash_consing.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,7 @@ end
104104
f = 0.5
105105
r = 1 // 2
106106
@test hash(f) == hash(r)
107-
@test hash2(f) != hash2(r)
107+
u0 = zero(UInt)
108+
@test hash2(f, u0) != hash2(r, u0)
109+
@test f + a !== r + a
108110
end

0 commit comments

Comments
 (0)