Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
ansi-test
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Karsten Poeck
ansi-test
Commits
d459ae00
Commit
d459ae00
authored
Jun 04, 2003
by
pfdietz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests for find-method.
parent
2250009b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
131 additions
and
0 deletions
+131
-0
ansi-tests/find-method.lsp
ansi-tests/find-method.lsp
+130
-0
ansi-tests/load-objects.lsp
ansi-tests/load-objects.lsp
+1
-0
No files found.
ansi-tests/find-method.lsp
0 → 100644
View file @
d459ae00
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Tue Jun 3 21:12:03 2003
;;;; Contains: Tests for FIND-METHOD
(in-package :cl-test)
(defgeneric find-method-gf-01 (x))
(defparameter *find-method-gf-01-method1*
(defmethod find-method-gf-01 ((x integer)) 'a))
(defparameter *find-method-gf-01-method2*
(defmethod find-method-gf-01 ((x rational)) 'b))
(defparameter *find-method-gf-01-method3*
(defmethod find-method-gf-01 ((x real)) 'c))
(defparameter *find-method-gf-01-method4*
(defmethod find-method-gf-01 ((x t)) 'd))
(deftest find-method.1
(eqt (find-method #'find-method-gf-01 nil (list 'integer))
*find-method-gf-01-method1*)
t)
(deftest find-method.2
(eqt (find-method #'find-method-gf-01 nil (list (find-class 'integer)))
*find-method-gf-01-method1*)
t)
(deftest find-method.3
(eqt (find-method #'find-method-gf-01 nil (list 'rational))
*find-method-gf-01-method2*)
t)
(deftest find-method.4
(eqt (find-method #'find-method-gf-01 nil (list (find-class 'rational)))
*find-method-gf-01-method2*)
t)
(deftest find-method.5
(eqt (find-method #'find-method-gf-01 nil (list 'real))
*find-method-gf-01-method3*)
t)
(deftest find-method.6
(eqt (find-method #'find-method-gf-01 nil (list (find-class 'real)))
*find-method-gf-01-method3*)
t)
(deftest find-method.7
(eqt (find-method #'find-method-gf-01 nil (list t))
*find-method-gf-01-method4*)
t)
(deftest find-method.8
(eqt (find-method #'find-method-gf-01 nil (list (find-class t)))
*find-method-gf-01-method4*)
t)
(deftest find-method.9
(find-method #'find-method-gf-01 (list :around) (list t) nil)
nil)
(deftest find-method.10
(find-method #'find-method-gf-01 (list :after) (list 'integer) nil)
nil)
(deftest find-method.11
(find-method #'find-method-gf-01 (list :before) (list 'real) nil)
nil)
(deftest find-method.error.1
(classify-error (find-method))
program-error)
(deftest find-method.error.2
(classify-error (find-method #'find-method-gf-01))
program-error)
(deftest find-method.error.3
(classify-error (find-method #'find-method-gf-01 nil))
program-error)
(deftest find-method.error.4
(classify-error
(find-method #'find-method-gf-01 nil (list 'integer) nil nil))
program-error)
(deftest find-method.error.5
(handler-case
(find-method #'find-method-gf-01 nil (list 'symbol))
(error () :error))
:error)
(deftest find-method.error.6
(handler-case
(find-method #'find-method-gf-01 nil (list 'symbol) 'x)
(error () :error))
:error)
(deftest find-method.error.7
(handler-case
(find-method #'find-method-gf-01 nil nil)
(error () :error))
:error)
(deftest find-method.error.8
(handler-case
(find-method #'find-method-gf-01 nil (list 'integer t))
(error () :error))
:error)
(deftest find-method.error.9
(handler-case
(find-method #'find-method-gf-01 nil nil nil)
(error () :error))
:error)
(deftest find-method.error.10
(handler-case
(find-method #'find-method-gf-01 nil (list 'integer t) nil)
(error () :error))
:error)
ansi-tests/load-objects.lsp
View file @
d459ae00
...
...
@@ -46,3 +46,4 @@
(load "next-method-p.lsp")
(load "call-next-method.lsp")
(load "compute-applicable-methods.lsp")
(load "find-method.lsp")
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