diff options
author | Tom Tromey <tom@tromey.com> | 2018-08-09 17:56:53 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-08-09 17:56:53 -0600 |
commit | accb7b7ecc19f85c2750ded1046a464bc73c6a52 (patch) | |
tree | 1aa94af022d6700a93a8ff2b73f5b210046ac010 /test/src/fns-tests.el | |
parent | f822a2516d88eeb2118fbbc8554f155e86dfd74e (diff) | |
parent | 53483df0de0085dbc9ef0b15a0f629ab808b0147 (diff) | |
download | emacs-accb7b7ecc19f85c2750ded1046a464bc73c6a52.tar.gz |
Merge remote-tracking branch 'origin/master' into feature/bignum
Diffstat (limited to 'test/src/fns-tests.el')
-rw-r--r-- | test/src/fns-tests.el | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/src/fns-tests.el b/test/src/fns-tests.el index d560f0bb0d9..f722ed6333e 100644 --- a/test/src/fns-tests.el +++ b/test/src/fns-tests.el @@ -23,6 +23,17 @@ (require 'cl-lib) +;; Test that equality predicates work correctly on NaNs when combined +;; with hash tables based on those predicates. This was not the case +;; for eql in Emacs 26. +(ert-deftest fns-tests-equality-nan () + (dolist (test (list #'eq #'eql #'equal)) + (let* ((h (make-hash-table :test test)) + (nan 0.0e+NaN) + (-nan (- nan))) + (puthash nan t h) + (should (eq (funcall test nan -nan) (gethash -nan h)))))) + (ert-deftest fns-tests-reverse () (should-error (reverse)) (should-error (reverse 1)) |