diff options
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/data-tests.el | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/src/data-tests.el b/test/src/data-tests.el index 82649022576..a4c6b0e4915 100644 --- a/test/src/data-tests.el +++ b/test/src/data-tests.el | |||
| @@ -597,9 +597,23 @@ comparing the subr with a much slower lisp implementation." | |||
| 597 | (should (< (1- most-negative-fixnum) most-negative-fixnum)) | 597 | (should (< (1- most-negative-fixnum) most-negative-fixnum)) |
| 598 | (should (fixnump (1- (1+ most-positive-fixnum))))) | 598 | (should (fixnump (1- (1+ most-positive-fixnum))))) |
| 599 | 599 | ||
| 600 | (ert-deftest data-tests-logand () | ||
| 601 | (should (= -1 (logand -1))) | ||
| 602 | (let ((n (* 2 most-negative-fixnum))) | ||
| 603 | (should (= (logand -1 n) n)))) | ||
| 604 | |||
| 600 | (ert-deftest data-tests-logcount () | 605 | (ert-deftest data-tests-logcount () |
| 601 | (should (= (logcount (read "#xffffffffffffffffffffffffffffffff")) 128))) | 606 | (should (= (logcount (read "#xffffffffffffffffffffffffffffffff")) 128))) |
| 602 | 607 | ||
| 608 | (ert-deftest data-tests-logior () | ||
| 609 | (should (= -1 (logior -1))) | ||
| 610 | (should (= -1 (logior most-positive-fixnum most-negative-fixnum)))) | ||
| 611 | |||
| 612 | (ert-deftest data-tests-logxor () | ||
| 613 | (should (= -1 (logxor -1))) | ||
| 614 | (let ((n (1+ most-positive-fixnum))) | ||
| 615 | (should (= (logxor -1 n) (lognot n))))) | ||
| 616 | |||
| 603 | (ert-deftest data-tests-minmax () | 617 | (ert-deftest data-tests-minmax () |
| 604 | (let ((a (- most-negative-fixnum 1)) | 618 | (let ((a (- most-negative-fixnum 1)) |
| 605 | (b (+ most-positive-fixnum 1)) | 619 | (b (+ most-positive-fixnum 1)) |