[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 85f8aa1: Fix recent modifications in emacs-module-tests
From: |
Eli Zaretskii |
Subject: |
master 85f8aa1: Fix recent modifications in emacs-module-tests |
Date: |
Thu, 5 Dec 2019 09:39:15 -0500 (EST) |
branch: master
commit 85f8aa1089e6fdbdf27b6f2c775e377faa79b19b
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Fix recent modifications in emacs-module-tests
* test/data/emacs-module/mod-test.c (extract_big_integer): Fix
calculation of size of 'magnitude' when 'emacs_limb_t' is wider
than 'unsigned long'.
* test/src/emacs-module-tests.el
(module--test-assertions--load-non-live-object)
(module--test-assertions--call-emacs-from-gc): On MS-Windows,
check also mod-test-emacs with ".exe" appended, before
skipping the tests.
---
test/data/emacs-module/mod-test.c | 2 +-
test/src/emacs-module-tests.el | 8 ++++++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/test/data/emacs-module/mod-test.c
b/test/data/emacs-module/mod-test.c
index b579c8a..5addf61 100644
--- a/test/data/emacs-module/mod-test.c
+++ b/test/data/emacs-module/mod-test.c
@@ -401,7 +401,7 @@ extract_big_integer (emacs_env *env, emacs_value arg, mpz_t
result)
mpz_set_ui (result, 0);
return true;
}
- enum { order = -1, size = sizeof (unsigned long), endian = 0, nails = 0 };
+ enum { order = -1, size = sizeof (emacs_limb_t), endian = 0, nails = 0 };
assert (0 < count && count <= max_count);
emacs_limb_t *magnitude = malloc (count * size);
if (magnitude == NULL)
diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el
index c510784..1876608 100644
--- a/test/src/emacs-module-tests.el
+++ b/test/src/emacs-module-tests.el
@@ -257,7 +257,9 @@ must evaluate to a regular expression string."
(ert-deftest module--test-assertions--load-non-live-object ()
"Check that -module-assertions verify that non-live objects aren't accessed."
- (skip-unless (file-executable-p mod-test-emacs))
+ (skip-unless (or (file-executable-p mod-test-emacs)
+ (and (eq system-type 'windows-nt)
+ (file-executable-p (concat mod-test-emacs ".exe")))))
;; This doesn't yet cause undefined behavior.
(should (eq (mod-test-invalid-store) 123))
(module--test-assertion (rx "Emacs value not found in "
@@ -271,7 +273,9 @@ must evaluate to a regular expression string."
(ert-deftest module--test-assertions--call-emacs-from-gc ()
"Check that -module-assertions prevents calling Emacs functions
during garbage collection."
- (skip-unless (file-executable-p mod-test-emacs))
+ (skip-unless (or (file-executable-p mod-test-emacs)
+ (and (eq system-type 'windows-nt)
+ (file-executable-p (concat mod-test-emacs ".exe")))))
(module--test-assertion
(rx "Module function called during garbage collection\n")
(mod-test-invalid-finalizer)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 85f8aa1: Fix recent modifications in emacs-module-tests,
Eli Zaretskii <=