Commit 3a556c0c authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen
Browse files

Fix testcover.el usage of edebug.el symbols

* lisp/emacs-lisp/testcover.el (testcover-before)
(testcover-after, testcover-mark)
(testcover-analyze-coverage-edebug-after): Adjust usage of
`unknown' to `edebug-unknown' in testcover.el in addition to
edebug.el (bug#25471).
parent 77ee23d1
......@@ -246,7 +246,7 @@ BEFORE-INDEX is the form's index into the code-coverage vector."
(let ((before-entry (aref testcover-vector before-index)))
(when (eq (car-safe before-entry) 'noreturn)
(let* ((after-index (cdr before-entry)))
(aset testcover-vector after-index 'ok-coverage)))))
(aset testcover-vector after-index 'edebug-ok-coverage)))))
(defun testcover-after (_before-index after-index value)
"Update code coverage with the result of a form's evaluation.
......@@ -254,10 +254,10 @@ AFTER-INDEX is the form's index into the code-coverage
vector. Return VALUE."
(let ((old-result (aref testcover-vector after-index)))
(cond
((eq 'unknown old-result)
((eq 'edebug-unknown old-result)
(aset testcover-vector after-index (testcover--copy-object value)))
((eq 'maybe old-result)
(aset testcover-vector after-index 'ok-coverage))
(aset testcover-vector after-index 'edebug-ok-coverage))
((eq '1value old-result)
(aset testcover-vector after-index
(cons old-result (testcover--copy-object value))))
......@@ -271,7 +271,7 @@ vector. Return VALUE."
((not (condition-case ()
(equal value old-result)
(circular-list nil)))
(aset testcover-vector after-index 'ok-coverage))))
(aset testcover-vector after-index 'edebug-ok-coverage))))
value)
;; Add these behaviors to Edebug.
......@@ -356,13 +356,13 @@ eliminated by adding more test cases."
(while (> len 0)
(setq len (1- len)
data (aref coverage len))
(when (and (not (eq data 'ok-coverage))
(when (and (not (eq data 'edebug-ok-coverage))
(not (memq (car-safe data)
'(1value maybe noreturn)))
(setq j (+ def-mark (aref points len))))
(setq ov (make-overlay (1- j) j))
(overlay-put ov 'face
(if (memq data '(unknown maybe 1value))
(if (memq data '(edebug-unknown maybe 1value))
'testcover-nohits
'testcover-1value))))
(set-buffer-modified-p changed))))
......@@ -410,7 +410,7 @@ coverage tests. This function creates many overlays."
;; identified and treated correctly.
;;
;; The code coverage vector entries for the beginnings of forms will
;; be changed to `ok-coverage.', except for the beginnings of forms
;; be changed to `edebug-ok-coverage.', except for the beginnings of forms
;; which should never return, which will be changed to
;; (noreturn . AFTER-INDEX) so that testcover-before can set the entry
;; for the end of the form just before it is executed.
......@@ -513,7 +513,7 @@ where BEFORE-FORM is bound to either (edebug-before BEFORE-ID) or
form to be treated accordingly."
(let (val)
(unless (eql before-form 0)
(aset testcover-vector before-id 'ok-coverage))
(aset testcover-vector before-id 'edebug-ok-coverage))
(setq val (testcover-analyze-coverage-wrapped-form wrapped-form))
(when (or (eq wrapper '1value) val)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment