diff options
| author | Tom Tromey | 2018-07-08 09:22:17 -0600 |
|---|---|---|
| committer | Tom Tromey | 2018-07-12 22:12:28 -0600 |
| commit | 27980e36040d0693fe997de6b6b73c09c3ce1cb5 (patch) | |
| tree | 15e8f67ea21970bad9d4956f105dd41047a20894 /test/src | |
| parent | cca0e79ea81712786f92a6668c61001e60d24f32 (diff) | |
| download | emacs-27980e36040d0693fe997de6b6b73c09c3ce1cb5.tar.gz emacs-27980e36040d0693fe997de6b6b73c09c3ce1cb5.zip | |
Make ash and lsh handle bignums
* src/data.c (ash_lsh_impl): Handle bignums.
* test/src/data-tests.el (data-tests-ash-lsh): New test.
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/data-tests.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/src/data-tests.el b/test/src/data-tests.el index 2423d7a7098..07159df48cf 100644 --- a/test/src/data-tests.el +++ b/test/src/data-tests.el | |||
| @@ -614,4 +614,10 @@ comparing the subr with a much slower lisp implementation." | |||
| 614 | (data-tests-check-sign (% -1 -3) (% nb1 nb3)) | 614 | (data-tests-check-sign (% -1 -3) (% nb1 nb3)) |
| 615 | (data-tests-check-sign (mod -1 -3) (mod nb1 nb3)))) | 615 | (data-tests-check-sign (mod -1 -3) (mod nb1 nb3)))) |
| 616 | 616 | ||
| 617 | (ert-deftest data-tests-ash-lsh () | ||
| 618 | (should (= (ash most-negative-fixnum 1) | ||
| 619 | (* most-negative-fixnum 2))) | ||
| 620 | (should (= (lsh most-negative-fixnum 1) | ||
| 621 | (* (abs most-negative-fixnum) 2)))) | ||
| 622 | |||
| 617 | ;;; data-tests.el ends here | 623 | ;;; data-tests.el ends here |