Skip to content
GitLab
Projects
Groups
Snippets
/
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
bdd481ab
Commit
bdd481ab
authored
May 11, 2003
by
pfdietz
Browse files
Tests for NO-APPLICABLE-METHOD.
parent
1d1d972e
Changes
2
Hide whitespace changes
Inline
Side-by-side
ansi-tests/load-objects.lsp
View file @
bdd481ab
...
...
@@ -21,3 +21,4 @@
(load "slot-makunbound.lsp")
(load "slot-value.lsp")
(load "method-qualifiers.lsp")
(load "no-applicable-method.lsp")
ansi-tests/no-applicable-method.lsp
0 → 100644
View file @
bdd481ab
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Sun May 11 13:46:44 2003
;;;; Contains: Tests of NO-APPLICABLE-METHOD
(in-package :cl-test)
(deftest no-applicable-method.error.1
(classify-error (no-applicable-method))
program-error)
(defgeneric no-app-meth-gf-01 (x))
(deftest no-applicable-method.2
(handler-case
(progn (no-app-meth-gf-01 'x) :bad)
(error () :good))
:good)
(defparameter *no-app-meth-gf-02*
(defgeneric no-app-meth-gf-02 (x)))
(defmethod no-applicable-method ((x (eql *no-app-meth-gf-02*)) &rest args)
(declare (ignore args x))
:good)
(deftest no-applicable-method.3
(no-app-meth-gf-02 (cons 'a 'b))
:good)
(defparameter *no-app-meth-gf-03*
(defgeneric no-app-meth-gf-03 (x)))
(defmethod no-applicable-method ((x (eql *no-app-meth-gf-03*)) &rest args)
(declare (ignore args x))
:no-method-found)
(defmethod no-app-meth-gf-03 ((x integer)) :good)
(deftest no-applicable-method.4
(no-app-meth-gf-03 (cons 'a 'b))
:no-method-found)
(deftest no-applicable-method.5
(no-app-meth-gf-03 100)
:good)
(deftest no-applicable-method.6
(no-app-meth-gf-03 100000000000000000)
:good)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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