Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Karsten Poeck
ansi-test
Commits
ef8f5d60
Commit
ef8f5d60
authored
Jun 05, 2003
by
pfdietz
Browse files
Add a test for when a method is added on top of an existing method.
parent
dd3d0fe8
Changes
1
Hide whitespace changes
Inline
Side-by-side
ansi-tests/add-method.lsp
View file @
ef8f5d60
...
...
@@ -102,3 +102,32 @@
(funcall gf2 0)))
a b t t b b a)
;;; An existing method is replaced.
(deftest add-method.2
(let* ((specializers (list (find-class 'integer)))
(gf (eval '(defgeneric add-method-gf-15 (x)
(:method ((x integer)) 'a)
(:method ((x t)) 'b))))
(method (find-method gf nil specializers))
(gf2 (eval '(defgeneric add-method-gf-16 (x)
(:method ((x integer)) 'c)
(:method ((x t)) 'd))))
(method2 (find-method gf2 nil specializers)))
(values
(funcall gf 0)
(funcall gf 'x)
(funcall gf2 0)
(funcall gf2 'x)
(eqt gf (remove-method gf method))
(eqt gf2 (add-method gf2 method))
(eqt method (find-method gf2 nil specializers))
(eqt method2 (find-method gf2 nil specializers))
(funcall gf 0)
(funcall gf 'x)
(funcall gf2 0)
(funcall gf2 'x)))
a b c d t t t nil b b a d)
;;; Must add tests for: :around methods, :before methods, :after methods,
;;; nonstandard method combinations
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment