aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
Diffstat (limited to 'test/src')
-rw-r--r--test/src/emacs-module-tests.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el
index 162af21bbec..a6407524ad7 100644
--- a/test/src/emacs-module-tests.el
+++ b/test/src/emacs-module-tests.el
@@ -30,6 +30,14 @@
30 30
31(require 'mod-test mod-test-file) 31(require 'mod-test mod-test-file)
32 32
33(cl-defgeneric emacs-module-tests--generic (_))
34
35(cl-defmethod emacs-module-tests--generic ((_ module-function))
36 'module-function)
37
38(cl-defmethod emacs-module-tests--generic ((_ user-ptr))
39 'user-ptr)
40
33;; 41;;
34;; Basic tests. 42;; Basic tests.
35;; 43;;
@@ -74,6 +82,7 @@ changes."
74 (should (module-function-p func)) 82 (should (module-function-p func))
75 (should (functionp func)) 83 (should (functionp func))
76 (should (equal (type-of func) 'module-function)) 84 (should (equal (type-of func) 'module-function))
85 (should (eq (emacs-module-tests--generic func) 'module-function))
77 (should (string-match-p 86 (should (string-match-p
78 (rx bos "#<module function " 87 (rx bos "#<module function "
79 (or "Fmod_test_sum" 88 (or "Fmod_test_sum"
@@ -149,6 +158,7 @@ changes."
149 (r (mod-test-userptr-get v))) 158 (r (mod-test-userptr-get v)))
150 159
151 (should (eq (type-of v) 'user-ptr)) 160 (should (eq (type-of v) 'user-ptr))
161 (should (eq (emacs-module-tests--generic v) 'user-ptr))
152 (should (integerp r)) 162 (should (integerp r))
153 (should (= r n)))) 163 (should (= r n))))
154 164