aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
Diffstat (limited to 'test/src')
-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 d9cca557cf2..e4b9cbe25a4 100644
--- a/test/src/fns-tests.el
+++ b/test/src/fns-tests.el
@@ -23,6 +23,17 @@
23 23
24(require 'cl-lib) 24(require 'cl-lib)
25 25
26;; Test that equality predicates work correctly on NaNs when combined
27;; with hash tables based on those predicates. This was not the case
28;; for eql in Emacs 26.
29(ert-deftest fns-tests-equality-nan ()
30 (dolist (test (list #'eq #'eql #'equal))
31 (let* ((h (make-hash-table :test test))
32 (nan 0.0e+NaN)
33 (-nan (- nan)))
34 (puthash nan t h)
35 (should (eq (funcall test nan -nan) (gethash -nan h))))))
36
26(ert-deftest fns-tests-reverse () 37(ert-deftest fns-tests-reverse ()
27 (should-error (reverse)) 38 (should-error (reverse))
28 (should-error (reverse 1)) 39 (should-error (reverse 1))