(when c
(let* ((xtm (typep c 'topic-maps.xtm:xtm-error))
(identifier (typep c 'item-identifier-error))
- (code (cond (xtm (error-code c)) (identifier (item-identifier-error-code c)))))
+ (variant (typep c 'variant-error))
+ (code (cond (xtm (error-code c)) (identifier (item-identifier-error-code c)) (variant (variant-error-code c)))))
(topic-maps.test-foundation::fields
"class" (string (type-of c)) "code" (when code (string-downcase (string code)))
"detail" (cond (xtm (topic-maps.xtm:error-detail c))
- (identifier (topic-maps.tmdm::item-identifier-error-detail c)))
+ (identifier (topic-maps.tmdm::item-identifier-error-detail c))
+ (variant (topic-maps.tmdm::variant-error-detail c)))
"message" (princ-to-string c)
"line" (when xtm (error-line c)) "column" (when xtm (error-column c))
"positionUnit" (when xtm "approximate-SAX-line-column")
(equal (fourth spec) (topic-maps.xtm:error-detail c))
(eql (fifth spec) (error-line c)) (eql (sixth spec) (error-column c))
(equal iri (error-document-iri c)) (equal key (error-source-key c))))
+ ((typep c 'reification-error)
+ (and (eq (third spec) (reification-error-code c))
+ (equal (fourth spec) (topic-maps.tmdm::reification-error-detail c))
+ (null (fifth spec)) (null (sixth spec))))
+ ((typep c 'variant-error)
+ (and (eq (third spec) (variant-error-code c))
+ (equal (fourth spec) (topic-maps.tmdm::variant-error-detail c))
+ (null (fifth spec)) (null (sixth spec))))
((typep c 'topic-maps.tmdm::occurrence-identifier-error)
(and (eq (third spec) (item-identifier-error-code c))
(equal (fourth spec) (topic-maps.tmdm::item-identifier-error-detail c))
(dolist (row (list (list "accepted-is-fail" nil :fail)
(list "arbitrary-error-is-fail" (make-condition 'simple-error :format-control "local guard control") :fail)
(list "xml-error-is-fail" (condition-from (lambda () (read-body "<a><b></a>"))) :fail)
- (list "unsupported-is-not-pass" (condition-from (lambda () (read-body "<topic id='a'><name><itemIdentity href='#n'/><value>N</value></name></topic>"))) :unsupported)
+ (list "unsupported-is-not-pass" (condition-from (lambda () (read-body "<mergeMap href='urn:22s:requires-explicit-resolver'/>"))) :unsupported)
(list "wrong-xtm-cause-is-fail" (condition-from (lambda () (read-body "<topic id='2bad'/>"))) :fail)
(list "same-code-wrong-element-is-fail" (condition-from (lambda () (read-body "<unknown/>"))) :fail)))
(destructuring-bind (label c status) row