summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-12-06 08:55:30 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2015-12-06 09:09:58 -0800
commit2b3f5de2b31b90733a88868b31bed3f7038f7055 (patch)
tree0d7abb5beec3dcd49e02237ea6a66fa6e61a2a95 /modules
parent8b87522925c4acaa0b35459db2657fc4fc79f8d1 (diff)
downloademacs-2b3f5de2b31b90733a88868b31bed3f7038f7055.tar.gz
Port mod-test to x86-64 GNU/Linux running 32-bit
* modules/mod-test/test.el (mod-test-sum-test): Don’t attempt to match descriptions to operating systems. It didn’t work on Fedora x86-64 running a 32-bit executable, and it’s not worth the trouble anyway. Port to 32-bit platforms by removing an assumption about fixnum widths.
Diffstat (limited to 'modules')
-rw-r--r--modules/mod-test/test.el16
1 files changed, 7 insertions, 9 deletions
diff --git a/modules/mod-test/test.el b/modules/mod-test/test.el
index ad4cc49c690..c1defae9bd7 100644
--- a/modules/mod-test/test.el
+++ b/modules/mod-test/test.el
@@ -34,11 +34,9 @@
(should (stringp (nth 1 descr)))
(should (eq 0
(string-match
- (if (eq system-type 'windows-nt)
- "#<module function at \\(0x\\)?[0-9a-fA-F]+ from .*>"
- (if (eq system-type 'cygwin)
- "#<module function at \\(0x\\)?[0-9a-fA-F]+>"
- "#<module function Fmod_test_sum from .*>"))
+ (concat "#<module function "
+ "\\(at \\(0x\\)?[0-9a-fA-F]+\\( from .*\\)?"
+ "\\|Fmod_test_sum from .*\\)>")
(nth 1 descr))))
(should (= (nth 2 descr) 3)))
(should-error (mod-test-sum "1" 2) :type 'wrong-type-argument)
@@ -48,10 +46,10 @@
(1- most-positive-fixnum)))
(should (= (mod-test-sum 1 most-negative-fixnum)
(1+ most-negative-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)
+ :type 'overflow-error))
(ert-deftest mod-test-sum-docstring ()
(should (string= (documentation 'mod-test-sum) "Return A + B")))