]> code.delx.au - gnu-emacs/commitdiff
Port mod-test to 32-bit Emacs --without-wide-int
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 6 Dec 2015 22:54:29 +0000 (14:54 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 6 Dec 2015 22:55:16 +0000 (14:55 -0800)
* modules/mod-test/test.el (mod-test-sum-test):
Bring back the 2**29 tests, but port them to 32-bit Emacs
--without-wide-int.

modules/mod-test/test.el

index c1defae9bd72442ecaa14ed5e84a414f17dc5b7a..69bf933c7f927de3b72a3d5772b5eea7966d0a7a 100644 (file)
              (1- most-positive-fixnum)))
   (should (= (mod-test-sum 1 most-negative-fixnum)
              (1+ most-negative-fixnum)))
+  (when (< #x1fffffff most-positive-fixnum)
+    (should (= (mod-test-sum 1 #x1fffffff)
+               (1+ #x1fffffff)))
+    (should (= (mod-test-sum -1 #x20000000)
+               #x1fffffff)))
   (should-error (mod-test-sum 1 most-positive-fixnum)
                 :type 'overflow-error)
   (should-error (mod-test-sum -1 most-negative-fixnum)