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
ce01293a
Commit
ce01293a
authored
Jun 15, 2005
by
pfdietz
Browse files
Add some built-in class tests
parent
16d37bd4
Changes
4
Hide whitespace changes
Inline
Side-by-side
ansi-tests/defclass-errors.lsp
View file @
ce01293a
...
...
@@ -168,3 +168,24 @@
(,option nil))
program-error)))
t)
(deftest defclass.error.23
(loop for cl in *built-in-classes*
for name = (class-name cl)
unless (or (not name)
(handler-case
(progn (eval `(defclass ,(gensym) (,name))) nil)
(error (c) c)))
collect (list cl name))
nil)
(deftest defclass.error.24
(loop for cl in *built-in-classes*
for name = (class-name cl)
unless (or (not name)
(handler-case
(progn (eval `(defclass ,name ())))
(error (c) c)))
collect (list cl name))
nil)
ansi-tests/make-instance.lsp
View file @
ce01293a
...
...
@@ -39,13 +39,9 @@
t)
(deftest make-instance.error.6
(let ((classes (remove-duplicates
(remove-if-not
#'(lambda (cl) (typep cl 'built-in-class))
(mapcar #'class-of *universe*)))))
(loop for cl in classes
unless (eval `(signals-error (make-instance ',cl) error))
collect cl))
(loop for cl in *built-in-classes*
unless (eval `(signals-error (make-instance ',cl) error))
collect cl)
nil)
;; Definitions of methods
...
...
ansi-tests/slot-value.lsp
View file @
ce01293a
...
...
@@ -131,7 +131,7 @@
(deftest slot-value.error.5
(let ((built-in-class (find-class 'built-in-class))
(slot-name (gensym)))
(loop for e in *
mini-
universe*
(loop for e in *universe*
for class = (class-of e)
when (and (eq (class-of class) built-in-class)
(handler-case (progn (slot-value e slot-name) t)
...
...
@@ -142,7 +142,7 @@
(deftest slot-value.error.6
(let ((built-in-class (find-class 'built-in-class))
(slot-name (gensym)))
(loop for e in *
mini-
universe*
(loop for e in *universe*
for class = (class-of e)
when (and (eq (class-of class) built-in-class)
(handler-case (setf (slot-value e slot-name) t)
...
...
ansi-tests/universe.lsp
View file @
ce01293a
...
...
@@ -465,7 +465,8 @@
(macro-function 'cond)
#'meaningless-user-function-for-universe
#'meaningless-user-generic-function-for-universe
#'(lambda (x) x)))
#'(lambda (x) x)
(compile nil '(lambda (x) x))))
(defparameter *methods*
(list
...
...
@@ -524,3 +525,10 @@
*methods*))
'(;;; Others to fill in gaps
1.2s0 1.3f0 1.5d0 1.8l0 3/5 10000000000000000000000))))
(defparameter *classes*
(remove-duplicates (mapcar #'class-of *universe*)))
(defparameter *built-in-classes*
(remove-if-not #'(lambda (x) (typep x 'built-in-class))
*classes*))
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