297 |
|
|
298 |
(deftest structure-53-1 |
(deftest structure-53-1 |
299 |
(let ((s (make-struct-test-53 :a53 10 :b53 'a))) |
(let ((s (make-struct-test-53 :a53 10 :b53 'a))) |
300 |
(values (aref s 5) (aref s 6))) |
(values (my-aref s 5) (my-aref s 6))) |
301 |
10 a) |
10 a) |
302 |
|
|
303 |
(defstruct-with-tests (struct-test-54 (:type vector) |
(defstruct-with-tests (struct-test-54 (:type vector) |
308 |
|
|
309 |
(deftest structure-54-1 |
(deftest structure-54-1 |
310 |
(let ((s (make-struct-test-54 :a53 8 :b53 'g :a54 10 :b54 'a))) |
(let ((s (make-struct-test-54 :a53 8 :b53 'g :a54 10 :b54 'a))) |
311 |
(values (aref s 5) (aref s 6) (aref s 9) (aref s 10))) |
(values (my-aref s 5) (my-aref s 6) (my-aref s 9) (my-aref s 10))) |
312 |
8 g 10 a) |
8 g 10 a) |
313 |
|
|
314 |
(defstruct-with-tests (struct-test-55 (:type list) |
(defstruct-with-tests (struct-test-55 (:type list) |
388 |
(deftest structure-62-1 |
(deftest structure-62-1 |
389 |
(let* ((s (make-struct-test-62 :a 1)) |
(let* ((s (make-struct-test-62 :a 1)) |
390 |
(f (struct-test-62-f s))) |
(f (struct-test-62-f s))) |
391 |
|
(assert (typep f 'function)) |
392 |
(values |
(values |
393 |
(struct-test-62-a s) |
(struct-test-62-a s) |
394 |
(funcall f))) |
(funcall (the function f)))) |
395 |
1 nil) |
1 nil) |
396 |
|
|
397 |
(deftest structure-62-2 |
(deftest structure-62-2 |
398 |
(let* ((s (make-struct-test-62)) |
(let* ((s (make-struct-test-62)) |
399 |
(f (struct-test-62-f s)) |
(f (struct-test-62-f s)) |
400 |
(g (struct-test-62-g s))) |
(g (struct-test-62-g s))) |
401 |
(values |
(assert (typep f 'function)) |
402 |
(struct-test-62-a s) |
(assert (typep g 'function)) |
403 |
(funcall f) |
(locally |
404 |
(funcall g nil) |
(declare (type function f g)) |
405 |
(funcall f))) |
(values |
406 |
|
(struct-test-62-a s) |
407 |
|
(funcall f) |
408 |
|
(funcall g nil) |
409 |
|
(funcall f)))) |
410 |
nil a nil nil) |
nil a nil nil) |
411 |
|
|
412 |
;;; Keywords are allowed in defstruct |
;;; Keywords are allowed in defstruct |