From bff567f4b234afbc72a8da96362b9dcb8e4a6138 Mon Sep 17 00:00:00 2001 From: davidnolen Date: Mon, 22 Jan 2024 15:12:04 -0500 Subject: [PATCH] * more test assertions --- src/test/cljs/cljs/hashing_test.cljs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/test/cljs/cljs/hashing_test.cljs b/src/test/cljs/cljs/hashing_test.cljs index d3b6966c1..2a2ffcf18 100644 --- a/src/test/cljs/cljs/hashing_test.cljs +++ b/src/test/cljs/cljs/hashing_test.cljs @@ -95,6 +95,10 @@ (is (= (hash false) 1237))) (deftest test-cljs-3410 - (testing "Small floats should not hash the same" + (testing "Small doubles should not hash the same" (is (not= (hash-double -0.32553251) (hash-double -0.0000032553251))) - (is (not= (hash -0.32553251) (hash -0.0000032553251))))) + (is (not= (hash -0.32553251) (hash -0.0000032553251)))) + (testing "Same double hashes the same" + (is (= (hash 0.5) (hash 0.5))) + (is (= (hash -0.32553251) (hash -0.32553251))) + (is (= (hash -0.0000032553251) (hash -0.0000032553251)))))