summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp
diff options
context:
space:
mode:
authorNoam Postavsky <npostavs@gmail.com>2017-07-16 19:12:10 -0400
committerNoam Postavsky <npostavs@gmail.com>2017-08-07 18:43:55 -0400
commit95a04fd26c91e6c6c9191a629d26886f136e30fc (patch)
tree2ac918b82a0b22d7719cae4f63cd1e2bf2d0e7e2 /test/lisp/emacs-lisp
parent054c198c120c1f01a8ff753892d52710b740acc6 (diff)
downloademacs-95a04fd26c91e6c6c9191a629d26886f136e30fc.tar.gz
emacs-95a04fd26c91e6c6c9191a629d26886f136e30fc.tar.bz2
emacs-95a04fd26c91e6c6c9191a629d26886f136e30fc.zip
; Avoid test failures when running from compiled test files
* test/lisp/dom-tests.el: Require `subr-x' during runtime as well. * test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-defstruct-record): * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (eieio-test-23-inheritance-check, eieio-test-25-slot-tests): Mark as expected to fail when byte-compiled.
Diffstat (limited to 'test/lisp/emacs-lisp')
-rw-r--r--test/lisp/emacs-lisp/cl-lib-tests.el8
-rw-r--r--test/lisp/emacs-lisp/eieio-tests/eieio-tests.el12
2 files changed, 20 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/cl-lib-tests.el b/test/lisp/emacs-lisp/cl-lib-tests.el
index 65bd97f3b2d..9e68dceb8f1 100644
--- a/test/lisp/emacs-lisp/cl-lib-tests.el
+++ b/test/lisp/emacs-lisp/cl-lib-tests.el
@@ -518,7 +518,15 @@
(ert-deftest cl-lib-symbol-macrolet-2 ()
(should (equal (cl-lib-symbol-macrolet-4+5) (+ 4 5))))
+(defun cl-lib-tests--dummy-function ()
+ ;; Dummy function to see if the file is compiled.
+ t)
+
(ert-deftest cl-lib-defstruct-record ()
+ ;; This test fails when compiled, see Bug#24402/27718.
+ :expected-result (if (byte-code-function-p
+ (symbol-function 'cl-lib-tests--dummy-function))
+ :failed :passed)
(cl-defstruct foo x)
(let ((x (make-foo :x 42)))
(should (recordp x))
diff --git a/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
index 1a6ab9da085..d824bfc1bb4 100644
--- a/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
+++ b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
@@ -529,7 +529,15 @@ METHOD is the method that was attempting to be called."
"This class should break."))
:type 'invalid-slot-type))
+(defun eieio-tests--dummy-function ()
+ ;; Dummy function to see if the file is compiled.
+ t)
+
(ert-deftest eieio-test-23-inheritance-check ()
+ ;; This test fails when compiled, see Bug#27718.
+ :expected-result (if (byte-code-function-p
+ (symbol-function 'eieio-tests--dummy-function))
+ :failed :passed)
(should (child-of-class-p 'class-ab 'class-a))
(should (child-of-class-p 'class-ab 'class-b))
(should (object-of-class-p eitest-a 'class-a))
@@ -548,6 +556,10 @@ METHOD is the method that was attempting to be called."
(should (not (cl-typep "foo" 'class-a))))
(ert-deftest eieio-test-24-object-predicates ()
+ ;; This test fails when compiled, see Bug#27718.
+ :expected-result (if (byte-code-function-p
+ (symbol-function 'eieio-tests--dummy-function))
+ :failed :passed)
(let ((listooa (list (class-ab) (class-a)))
(listoob (list (class-ab) (class-b))))
(should (cl-typep listooa '(list-of class-a)))