X-Git-Url: https://dreyeck.freedombox.rocks/gitweb/topic-maps.git/blobdiff_plain/2b6d6f4c7ccc351871a33beeba4bc9f34971617e..6162ed68:/tests/xtm-occurrence-reification.lisp?ds=inline diff --git a/tests/xtm-occurrence-reification.lisp b/tests/xtm-occurrence-reification.lisp index 2ab5831..d9e0e0e 100644 --- a/tests/xtm-occurrence-reification.lisp +++ b/tests/xtm-occurrence-reification.lisp @@ -161,7 +161,8 @@ "model" (orr-model map) "CXTM" (babel:octets-to-string cx :encoding :utf-8) "readOccurrenceCounts" (coerce counts 'vector) "oldHandlesCanonicalAndLive" :true) *occurrence-reifier-controls*)) map))) (defun orr-error (label body class code &key resolver map-reifier) - (multiple-value-bind (c frames) (orr-condition-from (bytes (if map-reifier (map-reifier-xml map-reifier body) (document body))) label resolver) + (let ((source (ss-unsupported-source (if map-reifier (map-reifier-xml map-reifier body) (document body)) code label))) + (multiple-value-bind (c frames) (orr-condition-from (bytes source) label resolver) (let ((actual (cond ((typep c 'topic-maps.xtm:xtm-error) (error-code c)) ((typep c 'reification-error) (reification-error-code c)) ((typep c 'item-identifier-error) (item-identifier-error-code c))))) @@ -172,9 +173,10 @@ (and (equal *document* (error-document-iri c)) (equal label (error-source-key c)) (if (typep c 'xtm-xml-error) (topic-maps.xtm:error-cause c) (and (integerp (error-line c)) (integerp (error-column c))))))) - (push (mm-fields "label" label "documentIRI" *document* "sourceKey" label "sourceText" (if map-reifier (map-reifier-xml map-reifier body) (document body)) + (push (mm-fields "label" label "documentIRI" *document* "sourceKey" label "sourceText" source "condition" (mm-condition c) "nativeConditionHasNoSourcePositionSlots" (if (typep c 'topic-maps.xtm:xtm-error) :false :true) - "actualNativeAssignments" (coerce frames 'vector)) *occurrence-reifier-controls*)) c)) + "actualNativeAssignments" (coerce frames 'vector)) *occurrence-reifier-controls*)) c))) + (defun occurrence-reifier-tests () (setf *occurrence-reifier-controls* nil) (dolist (position '("unknown" "before" "after")) @@ -271,7 +273,7 @@ (orr-xml "#r" :value "A") (orr-xml "#u" :value "B") category category) 'reification-error :reifier-conflict)) (orr-error "Occurrence-own-II-cannot-be-Reifier-Topic-II" (format nil "~A" (orr-xml "urn:same" :ids '("urn:same"))) 'topic-maps.tmdm::occurrence-identifier-error :duplicate-item-identifier) - (orr-error "anyType-remains-Unsupported" (format nil "~A" (orr-xml "#r" :datatype "http://www.w3.org/2001/XMLSchema#anyType")) 'xtm-unsupported :resource-data-datatype) + (orr-error "anyType-remains-Unsupported" (format nil "~A" (orr-xml "#r" :datatype "http://www.w3.org/2001/XMLSchema#anyType")) 'xtm-unsupported :resource-resolver-required) (orr-error "Association-Reification-remains-Unsupported" "" 'xtm-rejection :invalid-percent-escape) (orr-error "Role-Reification-remains-Unsupported" "" 'xtm-rejection :invalid-percent-escape)) (defun orr-import-test ()