-
-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
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
- Evaluate if this method is sufficient. See this StackOverflow discussion.
Distribution
- Create a testlib.sml in the root directory that contains
Expect.nearTo
. This way we can introduce a policy that in order to update testlib.sml, we must also update this reference to it. - Copy this testlib.sml to all existing exercises; even though they don't depend on epsilon-delta tests, it is easier to have only one version of testlib.sml.
Assertion
- Create a CI script that asserts that all testlib.sml in the repository have the same checksum.
snahor