From: Olivier Dion via General Guile related discussions <guile-user@gnu.org>
To: "Jérémy Korwin-Zmijowski" <jeremy@korwin-zmijowski.fr>,
guile-user <guile-user@gnu.org>
Subject: Re: with-exception-handler experiment
Date: Wed, 09 Mar 2022 09:34:53 -0500 [thread overview]
Message-ID: <87r17bb3ea.fsf@laura> (raw)
In-Reply-To: <de6f14b7-9d32-57c6-4345-3f6f3ad7aac7@korwin-zmijowski.fr>
On Tue, 08 Mar 2022, Jérémy Korwin-Zmijowski <jeremy@korwin-zmijowski.fr> wrote:
> Hello Guilers,
>
> Hope you are all fine and safe.
>
> In the following code, I have a test which should check if my result is
> correct.
>
> If you change the expected string value "1 run, 1 failed" the assert
> procedure does not throw.
>
> ;;;; code under test
> (define runner
> (let ([result '(0 0)])
> (case-lambda
> [() (lambda (proc) (run-and-count proc result) result)]
I'm pretty sure the problem is here. You're returning the initial
result (0 0) and thus you're ending up with 0 run, 0 failed.
Try with [() (lambda (proc) (run-and-count proc result)] like you did
for the other cases.
Regards,
old
--
Olivier Dion
Polymtl
next prev parent reply other threads:[~2022-03-09 14:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-08 22:10 with-exception-handler experiment Jérémy Korwin-Zmijowski
2022-03-09 14:34 ` Olivier Dion via General Guile related discussions [this message]
2022-03-09 16:54 ` Jérémy Korwin-Zmijowski
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/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r17bb3ea.fsf@laura \
--to=guile-user@gnu.org \
--cc=jeremy@korwin-zmijowski.fr \
--cc=olivier.dion@polymtl.ca \
/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.
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).