[Scheme-reports] R7RS test suite? Per Bothner (31 Aug 2013 18:42 UTC)
Re: [Scheme-reports] R7RS test suite? Alex Shinn (31 Aug 2013 23:35 UTC)
Re: [Scheme-reports] R7RS test suite? Peter Bex (01 Sep 2013 10:18 UTC)
Re: [Scheme-reports] R7RS test suite? Alex Shinn (02 Sep 2013 11:48 UTC)
Re: [Scheme-reports] R7RS test suite? Per Bothner (01 Sep 2013 19:49 UTC)

[Scheme-reports] R7RS test suite? Per Bothner 31 Aug 2013 18:38 UTC

For Kawa I'm working my way through r7rs-test.scm
from chibi-scheme-0.6.1.  Is this the best/recommended
"standard" R7RS test suite?

It's (mostly) easy enough to skip tests that don't work
on Kawa.  (I mark them as "expected failures".)
However, there some issues with the testsuite itself,
in that it seems insufficiently robust and portable.

Some expressions return inexact real results, and
these are being compared with equals, which is non-portable.
I suggest using something like SRFI-64's test-approximate.

Some places expect an exact result, when that is not required
by the standard.  For example:
(test 30 ((compose sqrt *) 12 75))
Such tests could also use test-approximate:
(test-approximate 30 ((compose sqrt *) 12 75) 0.0001)

Having test-numeric-syntaxes take a long list of tests makes it
more difficult to deal with individual tests, in terms of
debugging or marking them as expected failures.
Instead of:
(test-numeric-syntaxes
  ("1" 1)
  ....
  ("#i1.0+1.0i" (make-rectangular 1.0 1.0) "1.0+1.0i" "1.+1.i")
  )
it would be better to write them as separate tests:
(test-numeric-syntax "1" 1)
...
(test-numeric-syntax "#i1.0+1.0i" (make-rectangular 1.0 1.0) "1.0+1.0i"
"1.+1.i")

Some of the test-numeric-syntaxes tests use "non-default"
exponent-markers.  Some implementations have different markers
return different floating-point precisions or representations,
so again comparing them with equal? is problematic.
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports