[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 95a04fd 2/8: ; Avoid test failures when running fro
From: |
Noam Postavsky |
Subject: |
[Emacs-diffs] master 95a04fd 2/8: ; Avoid test failures when running from compiled test files |
Date: |
Mon, 7 Aug 2017 21:09:40 -0400 (EDT) |
branch: master
commit 95a04fd26c91e6c6c9191a629d26886f136e30fc
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
; 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.
---
test/lisp/dom-tests.el | 5 ++++-
test/lisp/emacs-lisp/cl-lib-tests.el | 8 ++++++++
test/lisp/emacs-lisp/eieio-tests/eieio-tests.el | 12 ++++++++++++
3 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/test/lisp/dom-tests.el b/test/lisp/dom-tests.el
index 32d231a..24d4b93 100644
--- a/test/lisp/dom-tests.el
+++ b/test/lisp/dom-tests.el
@@ -26,7 +26,10 @@
(require 'dom)
(require 'ert)
-(eval-when-compile (require 'subr-x))
+
+;; `defsubst's are not inlined inside `ert-deftest' (see Bug#24402),
+;; therefore we can't use `eval-when-compile' here.
+(require 'subr-x)
(defun dom-tests--tree ()
"Return a DOM tree for testing."
diff --git a/test/lisp/emacs-lisp/cl-lib-tests.el
b/test/lisp/emacs-lisp/cl-lib-tests.el
index 65bd97f..9e68dce 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 1a6ab9d..d824bfc 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)))
- [Emacs-diffs] master updated (e6fa083 -> bec5b60), Noam Postavsky, 2017/08/07
- [Emacs-diffs] master 00f7e31 4/8: Add a test of handling of circular values to testcover-tests, Noam Postavsky, 2017/08/07
- [Emacs-diffs] master 95a04fd 2/8: ; Avoid test failures when running from compiled test files,
Noam Postavsky <=
- [Emacs-diffs] master cc30d77 5/8: Let `define-symbol-prop' take effect during compilation, Noam Postavsky, 2017/08/07
- [Emacs-diffs] master b5c8e98 6/8: Let the cl-typep effects of defclass work during compilation (Bug#27718), Noam Postavsky, 2017/08/07
- [Emacs-diffs] master 054c198 1/8: Catch argument and macroexpansion errors in ert, Noam Postavsky, 2017/08/07
- [Emacs-diffs] master 0508045 3/8: Don't error on circular values in testcover, Noam Postavsky, 2017/08/07
- [Emacs-diffs] master 79a7456 7/8: Don't define gv expanders in compiler's runtime (Bug#27016), Noam Postavsky, 2017/08/07
- [Emacs-diffs] master bec5b60 8/8: ; Merge: Fixes for macroexpansion and compilation, Noam Postavsky, 2017/08/07