From d716d3b09ea1154d8199d22686d186bdf2e03b99 Mon Sep 17 00:00:00 2001 From: "Bowen S. Zhu" Date: Wed, 27 Nov 2024 18:25:30 -0500 Subject: [PATCH] Add test for hash of symbolic expressions involving equivalent numbers --- test/hash_consing.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/hash_consing.jl b/test/hash_consing.jl index 92a9d6d8..aa6aa7a9 100644 --- a/test/hash_consing.jl +++ b/test/hash_consing.jl @@ -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