Subject: bug#73605: [PATCH] Replace SRFI-64 with a new implementation.

From: lloda <[email-masked]>
Date: Sat, 26 Oct 2024 20:09:46 +0200

> On 26 Oct 2024, at 16:09, Tomas Volf <[email-masked]> wrote:

>>> * test-approximate requires real arguments. The old version accepted complex arguments.
> 
> No objections, since it seems that (imag-part 0) works just fine, I can
> basically rewrite it to always consider the input complex, and it will
> work.

I think just changing within-epsilon to check (<= (magnitude (- expected value)) epsilon) would work.

While looking at this I noticed that 1) the default test runner doesn't print either the computed error or the specified error and 2) test-approximate doesn't store the computed error in the test result (it does store the specified error).

This makes it difficult for a custom test runner to print these things. I think test-approximate should store the computed error and also that these properties should be documented, so user-defined test routines (to compare other types) can use them as well. 

>>> * The exported variable test-log-to-file is gone.
> 
> I oppose to restoring this one.  When you loaded test file into REPL, it
> used to just litter your file system with random test log files created
> in whatever the current working directory is.  I do not consider that to
> be a good behavior.

I don't think the variable should be restored. I also think that if the option were to be offered in a different way, not writing files is the better default. However, users who relied on the variable should not lose functionality. Perhaps add an argument to the default runner?

Regards

  lloda