GNU bug report logs - #40434
27.0.90; Can't run ERT tests for edebugged generator functions

Previous Next

Package: emacs;

Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>

Date: Sat, 4 Apr 2020 16:58:01 UTC

Severity: normal

Tags: confirmed

Merged with 28725

Found in versions 26.0.60, 27.0.90

Full log


Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: 27.0.90; Can't run ERT tests for edebugged generator functions
Date: Wed, 10 Jun 2020 13:28:01 +0200
Am Sa., 4. Apr. 2020 um 18:57 Uhr schrieb Philipp Stephani
<p.stephani2 <at> gmail.com>:
>
>
> Insert into *scratch*:
>
> (require 'generator)
> (require 'ert)
> (iter-defun foo () (iter-yield 123))
> (ert-deftest foo () (should (equal (iter-next (foo)) 123)))
>
> Evaluate the first two forms.  Edebug the third form (C-u C-M-x).
> Evaluate the fourth form.  Then run the test using M-x ert RET RET.
> The test will reach `foo', then just hit space to continue.  The test
> will then fail with
>
> F foo
>     (void-function cps-internal-yield)

I think none of the macros in generator.el should use the 'body' or
'def-body' or 't' debug specifications. Generator functions don't
really have bodies in the edebug sense, as the CPS machinery rewrites
them completely. So probably these should all use 'form' for now,
until edebug grows functionality to instrument such functions.




This bug report was last modified 4 years and 258 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.