From 29f1cc7e67e75d3f35747e5f6edd4e7ba430f97e Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Tue, 25 Aug 2026 19:52:46 +0200 Subject: feat(of): admit and vigil_feast, both argued degenerate admit returns the empty list because disposition never returns Commemorate; vigil_feast returns None because the OF has no vigil office that its feast's movement could orphan -- 'of-nativity-vigil' is a Mass formulary of the solemnity, not a separate celebration. Both are argued from the sources rather than stubbed, and Precedence_of.rules now assembles the four functions the kernel resolver consumes. --- test/test_precedence_of.ml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'test/test_precedence_of.ml') diff --git a/test/test_precedence_of.ml b/test/test_precedence_of.ml index b947d11..6c50fa9 100644 --- a/test/test_precedence_of.ml +++ b/test/test_precedence_of.ml @@ -316,6 +316,27 @@ let test_disposition_never_commemorates () = Vocab_of.ranks) Vocab_of.ranks +let test_admit_is_always_empty () = + let cand slug rank = + mk ~slug ~rank ~origin:Precedence.Sanctoral () in + let observed = cand "of-winner" Vocab_of.Sollemnitas in + let temporal = cand "of-feria" Vocab_of.Feria in + let losers = + [ (cand "of-a" Vocab_of.Festum, Precedence.Ordinary, 70); + (cand "of-b" Vocab_of.Memoria_obligatoria, Precedence.Privileged, 100) ] in + Alcotest.(check int) "nothing is ever admitted" 0 + (List.length (Rite_of.Precedence_of.admit ~observed ~temporal losers)) + +let test_vigil_feast_is_always_none () = + List.iter + (fun slug -> + let c = mk ~slug ~rank:Vocab_of.Sollemnitas ~origin:Precedence.Sanctoral () in + Alcotest.(check bool) + (Printf.sprintf "%s has no vigil-feast link" slug) + true + (Rite_of.Precedence_of.vigil_feast c = None)) + [ "of-nativity-vigil"; "of-nativity"; "of-pentecost"; "of-peter-and-paul" ] + let suite = ( "precedence-of", [ Alcotest.test_case "Tabula part I (entries 1-4)" `Quick test_part1; @@ -323,5 +344,7 @@ let suite = Alcotest.test_case "Tabula part III (entries 10-13)" `Quick test_part3; Alcotest.test_case "band is total over the domain" `Slow test_exhaustive_band_total; Alcotest.test_case "disposition (Normae n. 60)" `Quick test_disposition; - Alcotest.test_case "disposition never commemorates" `Quick test_disposition_never_commemorates ] + Alcotest.test_case "disposition never commemorates" `Quick test_disposition_never_commemorates; + Alcotest.test_case "admit is always empty" `Quick test_admit_is_always_empty; + Alcotest.test_case "vigil_feast is always none" `Quick test_vigil_feast_is_always_none ] @ List.map QCheck_alcotest.to_alcotest [ prop_band_total ] ) -- cgit v1.3