summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoam Postavsky <npostavs@gmail.com>2017-07-19 18:48:50 -0400
committerNoam Postavsky <npostavs@gmail.com>2017-08-07 18:54:44 -0400
commit0508045ed7159bce5b5ea3b5fb72cf78b8b4ee8e (patch)
tree5e76ea73eaac672871b6045d97eb143fcb3ee556
parent95a04fd26c91e6c6c9191a629d26886f136e30fc (diff)
downloademacs-0508045ed7159bce5b5ea3b5fb72cf78b8b4ee8e.tar.gz
emacs-0508045ed7159bce5b5ea3b5fb72cf78b8b4ee8e.tar.bz2
emacs-0508045ed7159bce5b5ea3b5fb72cf78b8b4ee8e.zip
Don't error on circular values in testcover
* lisp/emacs-lisp/testcover.el (testcover-after, testcover-1value): Consider circular lists to be non-equal instead of signaling error.
-rw-r--r--lisp/emacs-lisp/testcover.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/testcover.el b/lisp/emacs-lisp/testcover.el
index 433ad38a147..17891fd6096 100644
--- a/lisp/emacs-lisp/testcover.el
+++ b/lisp/emacs-lisp/testcover.el
@@ -463,7 +463,10 @@ binding `testcover-vector' to the code-coverage vector for TESTCOVER-SYM
(cond
((eq (aref testcover-vector idx) 'unknown)
(aset testcover-vector idx val))
- ((not (equal (aref testcover-vector idx) val))
+ ((not (condition-case ()
+ (equal (aref testcover-vector idx) val)
+ ;; TODO: Actually check circular lists for equality.
+ (circular-list nil)))
(aset testcover-vector idx 'ok-coverage)))
val)
@@ -475,7 +478,10 @@ same value during coverage testing."
((eq (aref testcover-vector idx) '1value)
(aset testcover-vector idx (cons '1value val)))
((not (and (eq (car-safe (aref testcover-vector idx)) '1value)
- (equal (cdr (aref testcover-vector idx)) val)))
+ (condition-case ()
+ (equal (cdr (aref testcover-vector idx)) val)
+ ;; TODO: Actually check circular lists for equality.
+ (circular-list nil))))
(error "Value of form marked with `1value' does vary: %s" val)))
val)