summaryrefslogtreecommitdiff
path: root/test/src/data-tests.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2018-08-18 16:13:04 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2018-08-18 16:13:34 -0700
commit1d2df2fd03f35ca8d8dfc8b999d8bba3c7c13157 (patch)
treed399dd6434fc2da905c660eea0ce919e746c8951 /test/src/data-tests.el
parent97d273033b523bc07911c848d4e8bf96cdce0c90 (diff)
downloademacs-1d2df2fd03f35ca8d8dfc8b999d8bba3c7c13157.tar.gz
Improve bignum comparison (Bug#32463#50)
* src/data.c (isnan): Remove, as we can assume C99. (bignumcompare): Remove, folding its functionality into arithcompare. (arithcompare): Compare bignums directly here. Fix bugs when comparing NaNs to bignums. When comparing a bignum to a fixnum, just look at the bignum’s sign, as that’s all that is needed. Decrease scope of locals when this is easy. * test/src/data-tests.el (data-tests-bignum): Test bignum vs NaN.
Diffstat (limited to 'test/src/data-tests.el')
-rw-r--r--test/src/data-tests.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/src/data-tests.el b/test/src/data-tests.el
index 85cbab26106..688c32d6eeb 100644
--- a/test/src/data-tests.el
+++ b/test/src/data-tests.el
@@ -551,7 +551,10 @@ comparing the subr with a much slower lisp implementation."
(should (= b0 b0))
(should (/= b0 f-1))
- (should (/= b0 b-1))))
+ (should (/= b0 b-1))
+
+ (should (/= b0 0.0e+NaN))
+ (should (/= b-1 0.0e+NaN))))
(ert-deftest data-tests-+ ()
(should-not (fixnump (+ most-positive-fixnum most-positive-fixnum)))