]> git.eshelyaron.com Git - emacs.git/commitdiff
Port emacs-module-tests to 32-bit Emacs
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 22 Mar 2018 16:32:50 +0000 (09:32 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 22 Mar 2018 16:33:33 +0000 (09:33 -0700)
Fix a portability bug when emacs-module-tests.el is byte-compiled
with a 32-bit Emacs (where #x20000000 evaluates to a
floating-point number) and then is run on a 64-bit Emacs (where
the floating-point number causes a test failure).
* test/src/emacs-module-tests.el (mod-test-sum-test):
Don’t assume #x20000000 can be represented as an Emacs integer.

test/src/emacs-module-tests.el

index 4751638968f4709cda893ff4a7356fc0528fed3a..8b6328d35af0cec8e95a8a496a52a088b0ad1703 100644 (file)
@@ -66,7 +66,7 @@
   (when (< #x1fffffff most-positive-fixnum)
     (should (= (mod-test-sum 1 #x1fffffff)
                (1+ #x1fffffff)))
-    (should (= (mod-test-sum -1 #x20000000)
+    (should (= (mod-test-sum -1 (1+ #x1fffffff))
                #x1fffffff)))
   (should-error (mod-test-sum 1 most-positive-fixnum)
                 :type 'overflow-error)