Commit 471ccd41 authored by pfdietz's avatar pfdietz
Browse files

Allow the return value of MAKE-INSTANCES-OBSOLETE be either the class or its name

parent f92d9011
...@@ -12,12 +12,15 @@ ...@@ -12,12 +12,15 @@
(d :initarg :d :type fixnum :initform 0))) (d :initarg :d :type fixnum :initform 0)))
(deftest make-instances-obsolete.1 (deftest make-instances-obsolete.1
(let* ((class (find-class 'make-instances-obsolete-class-01)) (let* ((class-designator 'make-instances-obsolete-class-01)
(class (find-class class-designator))
(obj (make-instance class :a 'x :b 'y :c 'z :d 17))) (obj (make-instance class :a 'x :b 'y :c 'z :d 17)))
(values (values
(eqt (class-of obj) class) (eqt (class-of obj) class)
(map-slot-value obj '(a b c d)) (map-slot-value obj '(a b c d))
(eqt (make-instances-obsolete class) class) (let ((val (make-instances-obsolete class)))
(or (eqt val class-designator)
(eqt val class)))
(map-slot-value obj '(a b c d)))) (map-slot-value obj '(a b c d))))
t (x y z 17) t (x y z 17)) t (x y z 17) t (x y z 17))
...@@ -28,7 +31,9 @@ ...@@ -28,7 +31,9 @@
(values (values
(eqt (class-of obj) class) (eqt (class-of obj) class)
(map-slot-value obj '(a b c d)) (map-slot-value obj '(a b c d))
(eqt (make-instances-obsolete class-designator) class-designator) (let ((val (make-instances-obsolete class-designator)))
(or (eqt val class-designator)
(eqt val class)))
(map-slot-value obj '(a b c d)))) (map-slot-value obj '(a b c d))))
t (x y z 17) t (x y z 17)) t (x y z 17) t (x y z 17))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment