diff options
| author | Tom Tromey | 2018-07-07 22:19:21 -0600 |
|---|---|---|
| committer | Tom Tromey | 2018-07-12 22:12:27 -0600 |
| commit | 8fb995b9e360270b6a4d7b7732a127a6234eba23 (patch) | |
| tree | b2d93630fa1b764c3c098b4869cd05ac9ca574d8 /test/src | |
| parent | a770fb44288c75fa2b0471ceaf00bf741376e40f (diff) | |
| download | emacs-8fb995b9e360270b6a4d7b7732a127a6234eba23.tar.gz emacs-8fb995b9e360270b6a4d7b7732a127a6234eba23.zip | |
Make min and max handle bignums
* src/data.c (minmax_driver): Handle bignums.
* test/src/data-tests.el (data-tests-minmax): New test.
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/data-tests.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/src/data-tests.el b/test/src/data-tests.el index 561b7bd9ca6..4565cfb3877 100644 --- a/test/src/data-tests.el +++ b/test/src/data-tests.el | |||
| @@ -590,4 +590,11 @@ comparing the subr with a much slower lisp implementation." | |||
| 590 | (ert-deftest data-tests-logcount () | 590 | (ert-deftest data-tests-logcount () |
| 591 | (should (= (logcount (read "#xffffffffffffffffffffffffffffffff")) 128))) | 591 | (should (= (logcount (read "#xffffffffffffffffffffffffffffffff")) 128))) |
| 592 | 592 | ||
| 593 | (ert-deftest data-tests-minmax () | ||
| 594 | (let ((a (- most-negative-fixnum 1)) | ||
| 595 | (b (+ most-positive-fixnum 1)) | ||
| 596 | (c 0)) | ||
| 597 | (should (= (min a b c) a)) | ||
| 598 | (should (= (max a b c) b)))) | ||
| 599 | |||
| 593 | ;;; data-tests.el ends here | 600 | ;;; data-tests.el ends here |