Skip to content
Snippets Groups Projects
Commit 2943073b authored by pfdietz's avatar pfdietz
Browse files

Test that invalid method qualifiers in some methods does not break calls for...

Test that invalid method qualifiers in some methods does not break calls for which those methods are not applicable.
parent e6a59b6f
No related branches found
No related tags found
No related merge requests found
...@@ -200,3 +200,28 @@ ...@@ -200,3 +200,28 @@
(handler-case (funcall fn '(b)) (handler-case (funcall fn '(b))
(error () :error))) (error () :error)))
:error) :error)
(deftest defgeneric-method-combination.append.13
(progn
(eval '(defgeneric dg-mc.append.13 (x)
(:method-combination append)
(:method append ((x dgmc-class-01)) (list 'foo))
(:method append ((x dgmc-class-02)) (list 'bar))
(:method nonsense ((x dgmc-class-03)) (list 'bad))))
(values
(dg-mc.append.13 (make-instance 'dgmc-class-01))
(dg-mc.append.13 (make-instance 'dgmc-class-02))
(handler-case
(dg-mc.append.13 (make-instance 'dgmc-class-03))
(error () :caught))
(handler-case
(dg-mc.append.13 (make-instance 'dgmc-class-04))
(error () :caught))
(handler-case
(dg-mc.append.13 (make-instance 'dgmc-class-07))
(error () :caught))))
(foo)
(bar foo)
:caught
:caught
:caught)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment