X-Git-Url: https://dreyeck.freedombox.rocks/gitweb/topic-maps.git/blobdiff_plain/bdc56a8236c6e6180df217d37e82846025026096..b2eecffa:/tests/ctm-association-arity.lisp diff --git a/tests/ctm-association-arity.lisp b/tests/ctm-association-arity.lisp index d67ce4c..3a83cd2 100644 --- a/tests/ctm-association-arity.lisp +++ b/tests/ctm-association-arity.lisp @@ -161,7 +161,7 @@ (when (and (not via-identifier) (not reverse-order)) (witness label map))))))))) (defun syntax-tests () - (dolist (fixture '(("a()" :expected-role 2) ("a(r: )" :expected-role-player 5) + (dolist (fixture '(("a()" :undefined-template 0) ("a(r: )" :expected-role-player 5) ("a(r: p,)" :expected-role 7) ("a(r: p" :missing-association-close 6) ("a(r: p, s: q, t: )" :expected-role-player 17) ("a(r: p, s: q, t: z,)" :expected-role 19) @@ -169,7 +169,7 @@ (destructuring-bind (text code position) fixture (let ((c (condition-from (lambda () (read-text text))))) (check (concatenate 'string "syntax:specific-rejection-and-position:" text) - (and (eq (type-of c) 'topic-maps.ctm:ctm-rejection) (eq code (topic-maps.ctm:error-code c)) + (and (typep c 'topic-maps.ctm:ctm-rejection) (eq code (topic-maps.ctm:error-code c)) (= position (topic-maps.ctm:error-position c)) (= 1 (topic-maps.ctm:error-line c)) (= (1+ position) (topic-maps.ctm:error-column c))))))) (let* ((text (format nil "a(r: p,~% s: q,~% t: )")) (c (condition-from (lambda () (read-text text))))) @@ -183,8 +183,9 @@ (and (eq (type-of c) 'topic-maps.ctm:undefined-prefix) (eq :undefined-prefix (topic-maps.ctm:error-code c)) (= 14 (topic-maps.ctm:error-position c))))) (dolist (text '("a isa b." "a ako b.")) - (check (concatenate 'string "boundary:17B-stays-unsupported:" text) - (typep (condition-from (lambda () (read-text text))) 'topic-maps.ctm:ctm-unsupported)))) + (check (concatenate 'string "boundary:17B-now-deserialized:" text) + (let* ((map (read-text text)) (a (first (topic-map-associations map)))) + (and (= 2 (length (association-roles a))) (valid-model-p map)))))) (defun original-case () (let* ((id "ctm/in/association-duplicate-role.ctm")