emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 0111862: Port emacs-module-tests to 32-bit Emacs


From: Paul Eggert
Subject: [Emacs-diffs] master 0111862: Port emacs-module-tests to 32-bit Emacs
Date: Thu, 22 Mar 2018 12:33:40 -0400 (EDT)

branch: master
commit 011186279c1041e790b81af72981547d623d9b29
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Port emacs-module-tests to 32-bit Emacs
    
    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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el
index 4751638..8b6328d 100644
--- a/test/src/emacs-module-tests.el
+++ b/test/src/emacs-module-tests.el
@@ -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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]