chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Using epsilon in test egg


From: Matt Gushee
Subject: Re: [Chicken-users] Using epsilon in test egg
Date: Sat, 26 Jul 2014 19:51:06 -0600

Hi, Alex--

On Sat, Jul 26, 2014 at 7:11 PM, Alex Charlton
<address@hidden> wrote:

> The problem you’re having is because test only uses the approximate 
> comparison (using current-test-epsilon) when the _expected_ value is inexact: 
> http://api.call-cc.org/doc/scheme/inexact%3F

Thank you. That clarifies things a bit.

> All you’ll need to do to properly test your lists is to break the test down 
> so that you are testing the floats one at a time. You could also set 
> current-test-comparator to a function that will work given your requirements. 
> This is the default current-test-comparator:

I guess my explanation wasn't entirely clear, but that's pretty much
what I was already doing. I showed the equality predicate I was using,
which tests individual values in the list with = . I think my mistake
was in assuming that (current-test-epsilon) would apply to = in the
test environment. I'm guessing now that that is not the case.

--
Matt



reply via email to

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