X-Git-Url: https://dreyeck.freedombox.rocks/gitweb/topic-maps.git/blobdiff_plain/cc1a0e02803a5705c97fb5457f6e93ad22f8b347..acc9eb65b0cce71409ad84841f082f5ca125c839:/tests/ctm-xtm-equivalence.lisp diff --git a/tests/ctm-xtm-equivalence.lisp b/tests/ctm-xtm-equivalence.lisp index 66fb78b..4993c9f 100644 --- a/tests/ctm-xtm-equivalence.lisp +++ b/tests/ctm-xtm-equivalence.lisp @@ -340,12 +340,9 @@ "The XTM Name has an extra II that CTM cannot express here. It is not removed for comparison."))) (defun gap-tests () (dolist (row (list - (list "occurrence-scope-reifier" "a t:\"42\"^^@s ~r." - (xml "42") - "occurrence" '("CTM 3.10" "XTM 4.15" "TMDM 5.6")) (list "association-role-scope-reifiers" "rel(role: a ~rr)@s ~ar" (xml "") - "association" '("CTM 3.3.9-3.3.10,3.13" "XTM 4.3.2,4.18-4.19" "TMDM 5.3.4,5.7-5.8")))) + "role" '("CTM 3.3.9-3.3.10,3.13" "XTM 4.3.2,4.18-4.19" "TMDM 5.3.4,5.7-5.8")))) (destructuring-bind (id ctm-source xtm-source element clauses) row (let* ((doc (format nil "https://equivalence.example.invalid/gap-~A/map" id)) (ctm (execute :ctm ctm-source doc (concatenate 'string "gap:CTM:" id))) @@ -383,6 +380,12 @@ :keys '("rel" "role" "a") :counts '(3 0 0 0 1 1 0) :why "CTM relation and explicit XTM association have the same type and one role with equal type/player, no scope or metadata." :clauses '("CTM 3.13" "XTM 4.18-4.20" "TMDM 5.7-5.8,6.6-6.7"))) + (run-pair (list :id "occurrence-scope-reifier" + :ctm "a t:\"42\"^^@s ~r." + :xtm (xml "42") + :keys '("a" "t" "s" "r") :counts '(4 0 0 1 0 0 1) + :why "Both readers create the same typed scoped integer Occurrence and the same II-identified Reifier with inverse relation." + :clauses '("CTM 3.10" "XTM 4.3.2,4.15" "TMDM 5.3.4-5.3.5,5.6,6.5"))) (contrast-tests) (gap-tests) (check "equivalence:unique-check-labels" (= (length topic-maps.xtm-mergemap.tests::*checks*) @@ -391,6 +394,6 @@ (when path (write-report path c)) (error c))) (setf *checks* (reverse topic-maps.xtm-mergemap.tests::*checks*)) (when path (write-report path)) - (format t "CTM-XTM-EQUIVALENCE-PASS: ~D checks; ~D actual reader pairs; 3 contrasts; 2 explicit capability gaps.~%" - (length *checks*) (1+ (length (pair-cases)))) + (format t "CTM-XTM-EQUIVALENCE-PASS: ~D checks; ~D actual reader pairs; 3 contrasts; 1 explicit capability gap.~%" + (length *checks*) (+ 2 (length (pair-cases)))) (length *checks*))))