summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2021-12-20 15:25:23 +0100
committerStefan Kangas <stefan@marxist.se>2021-12-20 16:05:56 +0100
commitb5393c68aef07562a1cc14ed100c3dbfb29f11ce (patch)
tree2a72ebc325159dae75c2157c85f7f2e921ff04b3
parent2bfea5fd1fd1335d4b865e5561f8a40596064eae (diff)
downloademacs-b5393c68aef07562a1cc14ed100c3dbfb29f11ce.tar.gz
Silence undefined function warnings in eieio-tests.el
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el: Silence byte-compiler with some function definitions. These are overridden by class definitions further down.
-rw-r--r--test/lisp/emacs-lisp/eieio-tests/eieio-tests.el13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
index a9e39ea8fb1..a462b4540d3 100644
--- a/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
+++ b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
@@ -137,6 +137,9 @@
;; (error "invalid-slot-type thrown when eieio-error-unsupported-class-tags is nil")
;; )))
+;; Silence byte-compiler.
+(defun eitest-subordinate--eieio-childp ())
+(defun class-alloc-initarg--eieio-childp ())
(ert-deftest eieio-test-01-mix-alloc-initarg ()
;; Only run this test if the message framework thingy works.
(skip-unless (and (message "foo") (string= "foo" (current-message))))
@@ -207,6 +210,9 @@ Argument C is the class bound to this static method."
(if (eieio-object-p c) (setq c (eieio-object-class c)))
(oset-default c some-slot value)))
+;; Silence byte-compiler.
+(defun static-method-class-2 ())
+(defun static-method-class-2--eieio-childp ())
(ert-deftest eieio-test-04-static-method ()
;; Call static method on a class and see if it worked
(static-method-class-method 'static-method-class 'class)
@@ -536,8 +542,10 @@ METHOD is the method that was attempting to be called."
(should (eq (oref eitest-pvinit evalval) 2))
(should (eq (oref eitest-pvinit evalnow) 1)))
+;; Silence byte-compiler.
(defvar eitest-tests nil)
-
+(defun eitest-superior ())
+(defun eitest-superior--eieio-childp ())
(ert-deftest eieio-test-22-init-forms-dont-match-runnable ()
;; Init forms with types that don't match the runnable.
(defclass eitest-subordinate nil
@@ -585,7 +593,10 @@ METHOD is the method that was attempting to be called."
(should-not (cl-typep listooa '(list-of class-b)))
(should-not (cl-typep listoob '(list-of class-a)))))
+;; Silence byte-compiler.
(defvar eitest-t1 nil)
+(defun eieio-tests-initform-not-evaluated-when-initarg-is-present ())
+(defun eieio-tests-initform-not-evaluated-when-initarg-is-present--eieio-childp ())
(ert-deftest eieio-test-25-slot-tests ()
(setq eitest-t1 (class-c))
;; Slot initialization