guile-user
[Top][All Lists]
Advanced

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

Re: Goops generic-functions and srfi-64 tests


From: Taylan Ulrich Bayırlı/Kammer
Subject: Re: Goops generic-functions and srfi-64 tests
Date: Sun, 23 Nov 2014 14:47:45 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Daniel Llorens <address@hidden> writes:

> SRFI-64 has all these specific binary predicates: test-eqv,
> test-equal, test-eq, test-approximate, but no way to pass your own
> predicate, which is annoying. Please correct me if I'm wrong.
>
> An extension to be able to pass your own predicate may be more
> generally useful.

You can use `test-assert': (test-assert (my-equal? foo bar))


While we're on the topic, random remark on the SRFI-64 reference
implementation which Guile also uses: I'm working on it as part of my
R7RS SRFIs project[0] right now, and in some ways it's broken and
doesn't conform to its own specification.

The spec says that the default "simple" test runner logs to standard
output only, when the reference implementation has it write to a log
file.

`test-assert' doesn't evaluate its test-name argument on some Scheme
platforms (on Guile it's fine), and some `test-foo' forms evaluate their
test-name argument twice due to a typo in the code...

Overall the code is quite dirty so be wary of bugs.

I'm cleaning up and fixing the code on my repo as I go, while retaining
the `cond-expand' stuff for extra functionality on platforms supporting
it (most notably line number reporting), but I already ditched the file
logging (i.e. a significant behavioral change) so I don't know if Guile
will want to adopt it.

A Guile-specific from-scratch rewrite might not be a bad idea if
anyone's interested.

[0] https://gitorious.org/taylan-scheme/srfi/

Taylan



reply via email to

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