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
b0a1b4b1
Commit
b0a1b4b1
authored
Apr 29, 2003
by
pfdietz
Browse files
Added tests for reinitialize-instance. The class definitions used are mostly in other files.
parent
dcba8188
Changes
2
Hide whitespace changes
Inline
Side-by-side
ansi-tests/load-objects.lsp
View file @
b0a1b4b1
...
...
@@ -12,3 +12,4 @@
(load "defclass-forward-reference.lsp")
(load "ensure-generic-function.lsp")
(load "allocate-instance.lsp")
(load "reinitialize-instance.lsp")
ansi-tests/reinitialize-instance.lsp
0 → 100644
View file @
b0a1b4b1
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Mon Apr 28 21:56:47 2003
;;;; Contains: Tests for REINITIALIZE-INSTANCE
(in-package :cl-test)
;;; Many of the classes used here are defined in defclass-??.lsp
(deftest reinitialize-instance.1
(let* ((obj (make-instance 'class-01))
(obj2 (reinitialize-instance obj)))
(values
(eqt obj obj2)
(map-slot-boundp* obj '(s1 s2 s3))))
t (nil nil nil))
(deftest reinitialize-instance.2
(let* ((obj (make-instance 'class-01))
(obj2 (reinitialize-instance obj :allow-other-keys nil)))
(values
(eqt obj obj2)
(map-slot-boundp* obj '(s1 s2 s3))))
t (nil nil nil))
(deftest reinitialize-instance.3
(let* ((obj (make-instance 'class-01))
(obj2 (reinitialize-instance obj :allow-other-keys t)))
(values
(eqt obj obj2)
(map-slot-boundp* obj '(s1 s2 s3))))
t (nil nil nil))
(deftest reinitialize-instance.4
(let* ((obj (make-instance 'class-01))
(obj2 (reinitialize-instance obj :allow-other-keys t
:allow-other-keys nil)))
(values
(eqt obj obj2)
(map-slot-boundp* obj '(s1 s2 s3))))
t (nil nil nil))
(deftest reinitialize-instance.5
(let* ((obj (make-instance 'class-07))
(obj2 (reinitialize-instance obj :s1a 'a :s2 'b :s1a 'bad
:s2 'bad2 :s1b 'bad3)))
(values
(eqt obj obj2)
(map-slot-value obj '(s1 s2))))
t (a b))
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