Open pclouds opened 4 years ago
If you want to try, you can check out https://github.com/pclouds/srfi-159/tree/portable-implementation-2, here's what I did
$ GERBIL_LOADPATH=$HOME/w/srfi/srfi-159/implementation/:$HOME/w/gerbil/lib/std/ ~/w/gerbil/bin/gxi --lang r7rs test.scm
show: ............................................xxxxx.......................
................x.......x.....x............................................xx.
..............................................................................
..............................................................................
......
302 out of 312 (96.8%) tests passed in .16062402725219727 seconds.
10 failures (3.2%).
FAIL: (show #f (with ((precision 2)) .997554209949891))
expected "1.00" but got "00.1"
FAIL: (show #f (with ((precision 2)) .9975542))
expected "1.00" but got "00.1"
FAIL: (show #f (with ((precision 2)) .99755))
expected "1.00" but got "00.1"
FAIL: (show #f (with ((precision 2)) .997))
expected "1.00" but got "00.1"
FAIL: (show #f (with ((precision 2)) .99))
expected "0.99" but got ".99"
FAIL: (show #f (with ((comma-rule 3) (decimal-sep #\,)) (numeric 2997...
expected "299.792.458,0" but got "299.792.458,"
FAIL: (show #f (numeric 0. 10))
expected "0.0" but got "0."
FAIL: (show #f (numeric 1. 10))
expected "1.0" but got "1."
FAIL: (show #f (with ((sign-rule #t)) (numeric -0.)))
expected "-0.0" but got "-0."
FAIL: (show #f (with ((sign-rule #t)) (numeric 0.)))
expected "+0.0" but got "+0."
That one uses my own implementation (also ported from chibi) not the one that comes with Gerbil. Swapping LOADPATH to prefer Gerbil's shows a few more errors. Some related to pretty
procedues which should be fixed by #360. Some others are about columnar...
Thank you for reporting this, i was pretty sure we would have some bugs there.
I was trying to run 159 tests and found failed test cases, e.g.
The expectation is "0.0" and "1.00".
I can't look into this yet (and no promise to do it) so I'm opening an issue here for you to keep track of it.