[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: with-exception-handler experiment
From: |
Olivier Dion |
Subject: |
Re: with-exception-handler experiment |
Date: |
Wed, 09 Mar 2022 09:34:53 -0500 |
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