23 |
|
|
24 |
;; Fields have appropriate values |
;; Fields have appropriate values |
25 |
(deftest structure-2-1 |
(deftest structure-2-1 |
26 |
(let ((s (make-s-2))) |
(let ((s (make-s-2))) |
27 |
(and |
(not (not |
28 |
(eql (s-2-f1 s) 0) |
(and |
29 |
(eq (s-2-f2 s) 'a) |
(eql (s-2-f1 s) 0) |
30 |
(eql (s-2-f3 s) 1.21) |
(eqt (s-2-f2 s) 'a) |
31 |
(eql (s-2-f4 s) #\d) |
(eql (s-2-f3 s) 1.21) |
32 |
(equal (s-2-f5 s) '(a b)) |
(eql (s-2-f4 s) #\d) |
33 |
(eql (s-2-f6 s) *s-2-f6-counter*))) |
(equal (s-2-f5 s) '(a b)) |
34 |
|
(eql (s-2-f6 s) *s-2-f6-counter*))))) |
35 |
t) |
t) |
36 |
|
|
37 |
;; Two successive invocations of make-s-2 return different objects |
;; Two successive invocations of make-s-2 return different objects |
38 |
(deftest structure-2-2 |
(deftest structure-2-2 |
39 |
(eq (s-2-f5 (make-s-2)) |
(eqt (s-2-f5 (make-s-2)) |
40 |
(s-2-f5 (make-s-2))) |
(s-2-f5 (make-s-2))) |
41 |
nil) |
nil) |
42 |
|
|