aboutsummaryrefslogtreecommitdiffstats
path: root/test/src/data-tests.el
diff options
context:
space:
mode:
authorTom Tromey2018-07-06 23:26:13 -0600
committerTom Tromey2018-07-12 22:12:27 -0600
commit0d868917efb46400cf7dd57a1cdbba7404f322a7 (patch)
tree82a07a0f48b03a6d41fb278ebedc6fc8000a80a6 /test/src/data-tests.el
parent025adce2cf43f4ce9f3c543c1b8973541e1414d2 (diff)
downloademacs-0d868917efb46400cf7dd57a1cdbba7404f322a7.tar.gz
emacs-0d868917efb46400cf7dd57a1cdbba7404f322a7.zip
Make 1+ and 1- handle bignums
* src/data.c (Fadd1, Fsub1): Handle bignums. * test/src/data-tests.el (data-tests-1+, data-tests-1-): New tests.
Diffstat (limited to 'test/src/data-tests.el')
-rw-r--r--test/src/data-tests.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/src/data-tests.el b/test/src/data-tests.el
index 1143028a126..dd6ce196f96 100644
--- a/test/src/data-tests.el
+++ b/test/src/data-tests.el
@@ -579,4 +579,12 @@ comparing the subr with a much slower lisp implementation."
579 (v (read s))) 579 (v (read s)))
580 (should (equal (number-to-string v) s)))) 580 (should (equal (number-to-string v) s))))
581 581
582(ert-deftest data-tests-1+ ()
583 (should (> (1+ most-positive-fixnum) most-positive-fixnum))
584 (should (fixnump (1+ (1- most-negative-fixnum)))))
585
586(ert-deftest data-tests-1- ()
587 (should (< (1- most-negative-fixnum) most-negative-fixnum))
588 (should (fixnump (1- (1+ most-positive-fixnum)))))
589
582;;; data-tests.el ends here 590;;; data-tests.el ends here