-(defun gap-tests ()
- (dolist (row (list
- (list "association-role-scope-reifiers" "rel(role: a ~rr)@s ~ar"
- (xml "<association reifier='#ar'><type><topicRef href='#rel'/></type><scope><topicRef href='#s'/></scope><role reifier='#rr'><type><topicRef href='#role'/></type><topicRef href='#a'/></role></association>")
- "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)))
- (xtm (execute :xtm xtm-source doc (concatenate 'string "gap:XTM:" id)))
- (map (getf ctm :map)) (c (getf xtm :condition)))
- (push (fields "id" id "kind" "reader-capability-gap-not-equivalence-PASS" "clauses" (coerce clauses 'vector)
- "documentIRI" doc "ctmSource" ctm-source "xtmSource" xtm-source
- "ctmCondition" (condition-data (getf ctm :condition)) "xtmCondition" (condition-data c)
- "ctmModel" (when map (model map)) "ctmCXTM" (when map (babel:octets-to-string (pure-cxtm (concatenate 'string "gap:" id) map doc) :encoding :utf-8))
- "xtmModel" (when (getf xtm :map) (model (getf xtm :map))) "successfulReaderPair" :false
- "missingCapability" (concatenate 'string "XTM " element " deserialization")) *rows*)
- (check (concatenate 'string "equivalence:gap:" id ":actual-unsupported-language-capability")
- (and map (null (getf ctm :condition)) (canonical-eq-p map) (null (getf xtm :map))
- (eq (type-of c) 'topic-maps.xtm:xtm-unsupported) (eq :unsupported-construct (topic-maps.xtm:error-code c))
- (search element (topic-maps.xtm:error-detail c))))))))