GNU bug report logs -
#40434
27.0.90; Can't run ERT tests for edebugged generator functions
Previous Next
Full log
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
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.