Re: test-equal: actual returned value is #f when tested expression raises execption Taylan Kammer (21 Feb 2021 14:22 UTC)

Re: test-equal: actual returned value is #f when tested expression raises execption Taylan Kammer 21 Feb 2021 14:21 UTC

On 20.02.2021 13:09, Jérémy Korwin-Zmijowski wrote:
> My concern here is that I did not defined the procedure in the module.
> It's empty.

I can reproduce this on Guile 2.2 (don't have access to 3.0 right now)
and in my opinion it's a bug.

I've also checked what my own SRFI-64 implementation does in this case,
and it reports the test as failed.

In my not-so-humble opinion, the reference implementation of SRFI-64,
which is what Guile ships with, is really terrible.  The code is
unreadable and unsurprisingly you end up having bugs.  It also doesn't
fully conform to its own specification.

My implementation is written as an R7RS module, which should work out of
the box with Guile 3.0 I suppose, since it supports R7RS.  With earlier
versions of Guile, you can make it work like this:

   (import (srfi srfi-1)
           (srfi srfi-9)
           (srfi srfi-11)
           (srfi srfi-35)
           (rnrs exceptions (6)))

   (load "path/to/scheme-srfis/srfi/64/test-runner.body.scm")
   (load "path/to/scheme-srfis/srfi/64/test-runner-simple.body.scm")
   (load "path/to/scheme-srfis/srfi/64/source-info.body.scm")
   (load "path/to/scheme-srfis/srfi/64/execution.body.scm")

The last line will produce a warning about possibly wrong number of
arguments to 'eval', but you can safely ignore that.

After this, use the regular SRFI-64 forms from the specification.

Here's the scheme-srfis repo that contains the implementation:

   https://github.com/TaylanUB/scheme-srfis

In the README you can see a couple notes about the SRFI-64 of this
project.  It offers two extensions that aren't in the standard.

- Taylan