/[gcl]/gcl/ansi-tests/update-instance-for-different-class.lsp
ViewVC logotype

Diff of /gcl/ansi-tests/update-instance-for-different-class.lsp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by pfdietz, Tue May 6 01:48:50 2003 UTC revision 1.2 by pfdietz, Tue May 6 01:59:43 2003 UTC
# Line 41  Line 41 
41       (eqt obj (change-class obj new-class))       (eqt obj (change-class obj new-class))
42       (typep* obj new-class)       (typep* obj new-class)
43       (map-slot-boundp* obj '(a b))       (map-slot-boundp* obj '(a b))
44         (slot-value obj 'a)
45       (slot-value obj 'b)))       (slot-value obj 'b)))
46    (t nil)    (t nil)
47    t t    t t
48      (t t)
49      1 1)
50    
51    (deftest update-instance-for-different-class.3
52      (let ((obj (make-instance 'uifdc-class-01a :b 1))
53            (new-class (find-class 'uifdc-class-01b)))
54        (values
55         (map-slot-boundp* obj '(a b))
56         (eqt obj (change-class obj new-class))
57         (typep* obj new-class)
58         (map-slot-boundp* obj '(a b))
59         (slot-value obj 'a)
60         (slot-value obj 'b)))
61    (nil t)    (nil t)
62    1)    t t
63      (t t)
64      1 1)
65    
66    (deftest update-instance-for-different-class.4
67      (let ((obj (make-instance 'uifdc-class-01a :a 1 :b 2))
68            (new-class (find-class 'uifdc-class-01b)))
69        (values
70         (map-slot-boundp* obj '(a b))
71         (eqt obj (change-class obj new-class))
72         (typep* obj new-class)
73         (map-slot-boundp* obj '(a b))
74         (slot-value obj 'a)
75         (slot-value obj 'b)))
76      (t t)
77      t t
78      (t t)
79      2 1)
80    
81    
82    
83    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26