aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_precedence_of.ml25
1 files changed, 24 insertions, 1 deletions
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 ] )