From: Lars Ingebrigtsen <larsi@gnus.org>
To: Gemini Lasswell <gazally@runbox.com>
Cc: 25471@debbugs.gnu.org
Subject: bug#25471: 26.0.50; Edebug and Testcover give incorrect code coverage results for code that uses 'unknown
Date: Sat, 27 Jul 2019 12:30:49 +0200 [thread overview]
Message-ID: <874l37lqg6.fsf@mouse.gnus.org> (raw)
In-Reply-To: <m28tq97538.fsf@rainbow.local> (Gemini Lasswell's message of "Tue, 17 Jan 2017 13:24:11 -0800")
Gemini Lasswell <gazally@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
next prev parent reply other threads:[~2019-07-27 10:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-17 21:24 bug#25471: 26.0.50; Edebug and Testcover give incorrect code coverage results for code that uses 'unknown Gemini Lasswell
2019-07-27 10:30 ` Lars Ingebrigtsen [this message]
2021-02-06 11:29 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874l37lqg6.fsf@mouse.gnus.org \
--to=larsi@gnus.org \
--cc=25471@debbugs.gnu.org \
--cc=gazally@runbox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).