(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)
+ ;; The following tests are for 32-bit build --with-wide-int.
(should (= (mod-test-sum -1 most-positive-fixnum)
(1- most-positive-fixnum)))
(should (= (mod-test-sum 1 most-negative-fixnum)
- (1+ most-negative-fixnum))))
+ (1+ most-negative-fixnum)))
+ (should (= (mod-test-sum 1 #x1fffffff)
+ (1+ #x1fffffff)))
+ (should (= (mod-test-sum -1 #x20000000)
+ #x1fffffff)))
(ert-deftest mod-test-sum-docstring ()
(should (string= (documentation 'mod-test-sum) "Return A + B")))
value_to_lisp (emacs_value v)
{
#ifdef WIDE_EMACS_INT
- ptrdiff_t tmp = (ptrdiff_t)v;
- int tag = tmp & ((1 << GCTYPEBITS) - 1);
+ uintptr_t tmp = (uintptr_t)v;
+ unsigned tag = tmp & ((1 << GCTYPEBITS) - 1);
Lisp_Object o;
switch (tag)
{