Open sshine opened 5 years ago
Oh, hah, I found this discrepancy in the tests from my other work on #206 and #205. I guess I have done everything except for the final step. Maybe I should add a script and CI action to verify the checksums of all testlib.sml files to #206 in order to satisfy this issue entirely.
@sshine Do you think our current implementation of nearTo
is good enough, or should we use the full example you posted in the linked post? I don't really care enough to scrutinize their differences too much. FWIW, nearTo
as it is in the testlib.sml
for space age is immediately obvious.
Before 4c5fd1db1ae73d2bef7d9d12256a59d5fc4597a5, no tests used
Expect.nearTo
. Since the canonical test data expresses expected values with some unknown imprecision (e.g.31.69
when the result is31.68808781
), it is up to the language track to make test cases succeed correctly and meaningfully.Since Standard ML has no standard test framework, we distribute a testlib.sml along with each exercise. The OCaml track uses OUnit2's
cmp_float
which I've adapted in testlib.sml for thespace-age
exercise.This task consists of three parts. Feel free to pick any of these.
Evaluation
Distribution
Expect.nearTo
. This way we can introduce a policy that in order to update testlib.sml, we must also update this reference to it.Assertion