summaryrefslogtreecommitdiff
path: root/test/src/fns-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'test/src/fns-tests.el')
-rw-r--r--test/src/fns-tests.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/src/fns-tests.el b/test/src/fns-tests.el
index d440cfabda4..d560f0bb0d9 100644
--- a/test/src/fns-tests.el
+++ b/test/src/fns-tests.el
@@ -602,4 +602,15 @@
(should (equal x y))
(should-not (eql x 0.0e+NaN))))
+(ert-deftest test-bignum-hash ()
+ "Test that hash tables work for bignums."
+ ;; Make two bignums that are eql but not eq.
+ (let ((b1 (1+ most-positive-fixnum))
+ (b2 (1+ most-positive-fixnum)))
+ (dolist (test '(eq eql equal))
+ (let ((hash (make-hash-table :test test)))
+ (puthash b1 t hash)
+ (should (eq (gethash b2 hash)
+ (funcall test b1 b2)))))))
+
(provide 'fns-tests)