guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: test-equal: actual returned value is #f when tested expression raise


From: Taylan Kammer
Subject: Re: test-equal: actual returned value is #f when tested expression raises execption
Date: Sun, 21 Feb 2021 15:21:59 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]