[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: srfi-64 apathetic test-error
From: |
John Cowan |
Subject: |
Re: srfi-64 apathetic test-error |
Date: |
Thu, 24 Oct 2019 12:21:46 -0400 |
Note however that such error tests are inherently non-portable (except in
R6RS systems only) and should be avoided when testing code intended to be
portable.
On Thu, Oct 24, 2019 at 12:20 PM Taylan Kammer <address@hidden>
wrote:
> On 23.10.2019 06:37, Christopher Howard wrote:
> > Hi, I was just wondering: `test-error' from (srfi srfi-64) gives a pass
> > if it catches an exception, but it doesn't seem to care whether or not
> > the exception caught matches what you told it to expect. Is this a bug?
>
> The (test-error ...) form takes an optional "error-type" operand. It
> can be an arbitrary predicate (one-argument procedure that returns a
> Boolean value) which tests if the error is the expected kind.
>
> See here for a complete documentation of the SRFI-64 API:
>
> https://srfi.schemers.org/srfi-64/srfi-64.html
>
> - Taylan
>
>