diff options
| author | Tom Tromey | 2018-07-06 23:26:13 -0600 |
|---|---|---|
| committer | Tom Tromey | 2018-07-12 22:12:27 -0600 |
| commit | 0d868917efb46400cf7dd57a1cdbba7404f322a7 (patch) | |
| tree | 82a07a0f48b03a6d41fb278ebedc6fc8000a80a6 /test/src/data-tests.el | |
| parent | 025adce2cf43f4ce9f3c543c1b8973541e1414d2 (diff) | |
| download | emacs-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.el | 8 |
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 |