]> dreyeck.freedombox.rocks Git - topic-maps.git/blobdiff - tests/ctm-association-arity.lisp
feat: support basic XTM topic names (slice 21D)
[topic-maps.git] / tests / ctm-association-arity.lisp
index 12465b091c05a64654598603df579a3e917be909..3a83cd2160bfc9468b7ca917651b3e17d53e8f71 100644 (file)
               (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)
     (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)))))