diff options
author | Tom Tromey <tom@tromey.com> | 2018-07-08 09:22:17 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-07-12 22:12:28 -0600 |
commit | 27980e36040d0693fe997de6b6b73c09c3ce1cb5 (patch) | |
tree | 15e8f67ea21970bad9d4956f105dd41047a20894 /test/src/data-tests.el | |
parent | cca0e79ea81712786f92a6668c61001e60d24f32 (diff) | |
download | emacs-27980e36040d0693fe997de6b6b73c09c3ce1cb5.tar.gz |
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/data-tests.el')
-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." (data-tests-check-sign (% -1 -3) (% nb1 nb3)) (data-tests-check-sign (mod -1 -3) (mod nb1 nb3)))) +(ert-deftest data-tests-ash-lsh () + (should (= (ash most-negative-fixnum 1) + (* most-negative-fixnum 2))) + (should (= (lsh most-negative-fixnum 1) + (* (abs most-negative-fixnum) 2)))) + ;;; data-tests.el ends here |