2
;;;; Author: Paul Dietz
3
;;;; Created: Mon Jan 20 21:25:22 2003
4
;;;; Contains: Tests for ADJUSTABLE-ARRAY-P
8
(deftest adjustable-array-p.1
9
(notnot (adjustable-array-p (make-array '(5) :adjustable t)))
12
(deftest adjustable-array-p.2
13
(notnot (adjustable-array-p (make-array nil :adjustable t)))
16
(deftest adjustable-array-p.3
17
(notnot (adjustable-array-p (make-array '(2 3) :adjustable t)))
20
(deftest adjustable-array-p.4
21
(notnot (adjustable-array-p (make-array '(2 2 2) :adjustable t)))
24
(deftest adjustable-array-p.5
25
(notnot (adjustable-array-p (make-array '(2 2 2 2) :adjustable t)))
28
(deftest adjustable-array-p.order.1
31
(notnot (adjustable-array-p (progn (setf x (incf i))
32
(make-array '(5) :adjustable t))))
38
(deftest adjustable-array-p.error.1
39
(signals-error (adjustable-array-p) program-error)
42
(deftest adjustable-array-p.error.2
43
(signals-error (adjustable-array-p "aaa" nil) program-error)
46
(deftest adjustable-array-p.error.3
47
(signals-error (adjustable-array-p 10) type-error)
50
(deftest adjustable-array-p.error.4
51
(loop for e in *mini-universe*
52
unless (or (typep e 'array)
53
(eval `(signals-error (adjustable-array-p ',e)
58
(deftest adjustable-array-p.error.5
59
(signals-error (locally (adjustable-array-p 10)) type-error)
62
(deftest adjustable-array-p.error.6
63
(signals-error (let ((x 10))
64
(locally (declare (optimize (safety 3)))
65
(adjustable-array-p x)))