aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorEli Zaretskii2015-12-01 20:34:12 +0200
committerEli Zaretskii2015-12-01 20:34:12 +0200
commitbdebeb77a001fc4d9ee8392829cd7bc6cd11d7d1 (patch)
tree250edf54b542db3477da7bfd4ae9fc2ba96c4ca7 /modules
parentb99a34bcb030d59e0e272b3379d1725a6eb01d95 (diff)
downloademacs-bdebeb77a001fc4d9ee8392829cd7bc6cd11d7d1.tar.gz
emacs-bdebeb77a001fc4d9ee8392829cd7bc6cd11d7d1.zip
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.
Diffstat (limited to 'modules')
-rw-r--r--modules/mod-test/test.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/mod-test/test.el b/modules/mod-test/test.el
index a0abdab49e5..eacc6671ead 100644
--- a/modules/mod-test/test.el
+++ b/modules/mod-test/test.el
@@ -42,7 +42,11 @@
42 (nth 1 descr)))) 42 (nth 1 descr))))
43 (should (= (nth 2 descr) 3))) 43 (should (= (nth 2 descr) 3)))
44 (should-error (mod-test-sum "1" 2) :type 'wrong-type-argument) 44 (should-error (mod-test-sum "1" 2) :type 'wrong-type-argument)
45 (should-error (mod-test-sum 1 "2") :type 'wrong-type-argument)) 45 (should-error (mod-test-sum 1 "2") :type 'wrong-type-argument)
46 (should (= (mod-test-sum -1 most-positive-fixnum)
47 (1- most-positive-fixnum)))
48 (should (= (mod-test-sum 1 most-negative-fixnum)
49 (1+ most-negative-fixnum))))
46 50
47(ert-deftest mod-test-sum-docstring () 51(ert-deftest mod-test-sum-docstring ()
48 (should (string= (documentation 'mod-test-sum) "Return A + B"))) 52 (should (string= (documentation 'mod-test-sum) "Return A + B")))