mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-30 10:11:47 -07:00
Fix emacs-module.c for wide ints
* src/emacs-module.c (lisp_to_value): Compare the produced value with the original Lisp object, not with the one potentially converted into a Lisp_Cons. Fixes assertion violations when working with integers larger than fit into a 32-bit value. * modules/mod-test/test.el (mod-test-sum-test): Add tests for large integers, to test --with-wide-int.
This commit is contained in:
parent
b99a34bcb0
commit
bdebeb77a0
2 changed files with 19 additions and 11 deletions
|
|
@ -42,7 +42,11 @@
|
|||
(nth 1 descr))))
|
||||
(should (= (nth 2 descr) 3)))
|
||||
(should-error (mod-test-sum "1" 2) :type 'wrong-type-argument)
|
||||
(should-error (mod-test-sum 1 "2") :type 'wrong-type-argument))
|
||||
(should-error (mod-test-sum 1 "2") :type 'wrong-type-argument)
|
||||
(should (= (mod-test-sum -1 most-positive-fixnum)
|
||||
(1- most-positive-fixnum)))
|
||||
(should (= (mod-test-sum 1 most-negative-fixnum)
|
||||
(1+ most-negative-fixnum))))
|
||||
|
||||
(ert-deftest mod-test-sum-docstring ()
|
||||
(should (string= (documentation 'mod-test-sum) "Return A + B")))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue