Before 4c5fd1d, no tests used Expect.nearTo. Since the canonical test data expresses expected values with some unknown imprecision (e.g. 31.69 when the result is 31.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 the space-age exercise.
This task consists of three parts. Feel free to pick any of these.
Evaluation
Distribution
Assertion
Before 4c5fd1d, no tests used
Expect.nearTo. Since the canonical test data expresses expected values with some unknown imprecision (e.g.31.69when 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_floatwhich I've adapted in testlib.sml for thespace-ageexercise.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