GNU bug report logs -
#25471
26.0.50; Edebug and Testcover give incorrect code coverage results for code that uses 'unknown
Previous Next
Reported by: Gemini Lasswell <gazally <at> runbox.com>
Date: Tue, 17 Jan 2017 21:26:02 UTC
Severity: normal
Tags: fixed
Found in version 26.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 25471 <at> debbugs.gnu.org (full text, mbox):
Gemini Lasswell <gazally <at> runbox.com> writes:
> If you use Edebug or Testcover to gather code coverage information on
> code which uses the symbol `unknown', you will get incorrect code
> coverage results, because Edebug uses `unknown' internally to represent
> forms which have never been evaluated under Edebug.
I've now fixed this in edebug.el on the trunk.
> For an example of incorrect code coverage, save this function definition
> in a file called bug.el:
>
> (defun how-do-i-know-you (name)
> (let ((val 'unknown))
> (when (equal name "Bob")
> (setq val 'known))
> val))
>
> And then use:
>
> M-x testcover-start RET bug.el RET
> M-: (how-do-i-know-you "Liz") RET
> M-x testcover-mark-all RET RET
However, the testcover case seems to be more complicated. `unknown'
seems straightforward, but there's also `1value' and `maybe' and perhaps
some other symbols that I'm not sure need this or not. `noreturn', for
instance, seems part of the official API and can't be changed... I
think?
I don't use testcover myself. Could you perhaps propose a patch to fix
this?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 4 years and 109 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.