diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-12 10:40:12 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-12 10:40:12 +0200 |
| commit | ac569e859be08320e47909e496d6e5e8f6057da7 (patch) | |
| tree | 3e8f8fdc4cae5de987e7886e4bfcc9fc0c77e38d /test/test_validate.ml | |
| parent | 40e7d5c9fb8ec4f68c1ea4ace3835d987a272fcb (diff) | |
| download | colitur-ac569e859be08320e47909e496d6e5e8f6057da7.tar.gz colitur-ac569e859be08320e47909e496d6e5e8f6057da7.zip | |
docs+test: small factual corrections (item 7, part 1)
Six independent, small corrections found during the final review:
- dune (workspace root): the comment said the stanza used "(:standard)"
to preserve dune's default `default` alias target; the stanza actually
spells that out explicitly via (alias_rec install). Comment now matches
the code.
- test_validate.ml's test_easter_extremes asserted `List.length ys = 2`
where an identity check was called for -- the comment already named
1598 and 1666, but nothing confirmed extreme_years() found THOSE two
rather than some other pair with the right cardinality. Now asserts the
identities directly (the project's "cardinality where identity was
required" vacuity flavour, per the review).
- test_oracle.ml and expected-divergences-missalemeum.sexp both claimed
"one entry (M13) is [verdict open]" -- M11 is open too (its own verdict
changed from colitur to open in fix round 1); both now say "two entries
(M11 and M13)".
- expected-divergences-missalemeum.sexp's M2 note attributed `band` to
temporal_ef.ml; `band` is precedence_ef.ml's own function.
- lib/kernel/precedence.mli documented `dropped`/`admit`'s physical-
equality obligation nowhere -- it lived only in one rite's own module
(Rite_ef.Precedence_ef.admit's doc comment), but this signature is what
an author of the next rite actually reads. Added the obligation here,
cross-referencing the EF instance as precedent, not the only source.
- README's opam install line omitted sexplib and ppx_sexp_conv (both in
dune-project's own depends; `dune build` fails without them for a
contributor following the README verbatim) and documented only
`colitur easter`, though `temporal` and `day` both exist and are the
more useful entry points. Fixed both.
No behaviour change: comment/doc/test-assertion corrections only (the
easter-extremes fix strengthens an assertion, it does not change what
passes). Verified byte-identical `colitur day` output across 1583, 1900,
1902, 2008, 2011, 2026, 2038, 9999. 259/259 tests green.
Diffstat (limited to 'test/test_validate.ml')
| -rw-r--r-- | test/test_validate.ml | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/test/test_validate.ml b/test/test_validate.ml index ee7f288..89053c1 100644 --- a/test/test_validate.ml +++ b/test/test_validate.ml @@ -79,9 +79,16 @@ let test_easter_extremes () = let ys = extreme_years () in (* Both extremes genuinely occur in 1583..2500 (earliest 1598, latest 1666 -- verified against Computus.gregorian_easter directly, not - transcribed); requiring just "non-empty" would have passed even if the - search silently found only one of them (register finding 15). *) - Alcotest.(check int) "found both extreme years (earliest 22 Mar and latest 25 Apr)" 2 (List.length ys); + transcribed). CORRECTED (final fix wave, item 7): this used to assert + only [List.length ys = 2], a cardinality check where an identity check + was called for -- the comment already named 1598 and 1666, but nothing + confirmed [ys] actually contained THOSE two years rather than some + other pair the search happened to find first; a version of + [extreme_years] that silently found the wrong two years but still + found exactly two would have passed this unchanged. Asserting the + identities directly is strictly stronger and costs nothing extra. *) + Alcotest.(check (list int)) "found exactly 1598 (earliest 22 Mar) and 1666 (latest 25 Apr)" + [ 1598; 1666 ] ys; List.iter check_year ys (* The confidence-to-9999 core: random years across the whole domain. *) |
