diff options
author | Gemini Lasswell <gazally@runbox.com> | 2017-09-26 08:14:23 -0700 |
---|---|---|
committer | Gemini Lasswell <gazally@runbox.com> | 2017-10-08 16:13:39 -0700 |
commit | 3c2e8eff8cc9a4a535f473b3e150cb056d8f891d (patch) | |
tree | 730be0a589aa785ebcbb48886d7d2c62afa77843 /test/lisp/emacs-lisp/testcover-resources/testcases.el | |
parent | d79cf638f278e50c22feb53d6ba556f5ce9d7853 (diff) | |
download | emacs-3c2e8eff8cc9a4a535f473b3e150cb056d8f891d.tar.gz emacs-3c2e8eff8cc9a4a535f473b3e150cb056d8f891d.tar.bz2 emacs-3c2e8eff8cc9a4a535f473b3e150cb056d8f891d.zip |
Stop Testcover from producing spurious 1value errors
Fix bug#25351 by copying results of form evaluations for later
comparison.
* lisp/emacs-lisp/testcover.el (testcover-after): Copy the result
of a form's first evaluation and compare subsequent evaluations to
the copy. Improve the error message used when a form's value
changes.
(testcover--copy-object, testcover--copy-object1): New functions.
* test/lisp/emacs-lisp/testcover-resources/testcases.el
(by-value-vs-by-reference-bug-25351): Remove expected failure tag.
(circular-lists-bug-24402): Add another circular list case.
Diffstat (limited to 'test/lisp/emacs-lisp/testcover-resources/testcases.el')
-rw-r--r-- | test/lisp/emacs-lisp/testcover-resources/testcases.el | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/test/lisp/emacs-lisp/testcover-resources/testcases.el b/test/lisp/emacs-lisp/testcover-resources/testcases.el index d8b8192748d..6a9612db05a 100644 --- a/test/lisp/emacs-lisp/testcover-resources/testcases.el +++ b/test/lisp/emacs-lisp/testcover-resources/testcases.el @@ -357,7 +357,6 @@ ;; ==== by-value-vs-by-reference-bug-25351 ==== "An object created by a 1value expression may be modified by other code." -:expected-result :failed ;; ==== (defun testcover-testcase-ab () (list 'a 'b)) @@ -491,10 +490,18 @@ regarding the odd-looking coverage result for the quoted form." "Testcover captures and ignores circular list errors." ;; ==== (defun testcover-testcase-cyc1 (a) - (let ((ls (make-list 10 a%%%))) - (nconc ls ls) - ls)) + (let ((ls (make-list 10 a%%%)%%%)) + (nconc ls%%% ls%%%) + ls)) ; The lack of a mark here is due to an ignored circular list error. (testcover-testcase-cyc1 1) (testcover-testcase-cyc1 1) +(defun testcover-testcase-cyc2 (a b) + (let ((ls1 (make-list 10 a%%%)%%%) + (ls2 (make-list 10 b))) + (nconc ls2 ls2) + (nconc ls1%%% ls2) + ls1)) +(testcover-testcase-cyc2 1 2) +(testcover-testcase-cyc2 1 4) ;; testcases.el ends here. |