13 |
;;; There will be a separate test suite |
;;; There will be a separate test suite |
14 |
;;; for ACCESSORS x SETF-like macros |
;;; for ACCESSORS x SETF-like macros |
15 |
|
|
16 |
|
;;; See also places.lsp |
17 |
|
|
18 |
(deftest push-1 |
(deftest push-1 |
19 |
(let ((x nil)) |
(let ((x nil)) |
20 |
(push 'a x)) |
(push 'a x)) |
49 |
(list x y))) |
(list x y))) |
50 |
(nil nil)) |
(nil nil)) |
51 |
|
|
52 |
|
;;; Confirm argument is executed just once. |
53 |
|
(deftest pop-3 |
54 |
|
(let ((i 0) |
55 |
|
(a (vector (list 'a 'b 'c)))) |
56 |
|
(pop (aref a (progn (incf i) 0))) |
57 |
|
(values a i)) |
58 |
|
#((b c)) 1) |
59 |
|
|
60 |
(deftest push-and-pop |
(deftest push-and-pop |
61 |
(let* ((x (copy-tree '(a b))) |
(let* ((x (copy-tree '(a b))) |
62 |
(y x)) |
(y x)) |
69 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
70 |
;;; pushnew |
;;; pushnew |
71 |
|
|
72 |
|
;;; See also places.lsp |
73 |
|
|
74 |
(deftest pushnew-1 |
(deftest pushnew-1 |
75 |
(let ((x nil)) |
(let ((x nil)) |
76 |
(let ((y (pushnew 'a x))) |
(let ((y (pushnew 'a x))) |