1 ;;;; This software is part of the SBCL system. See the README file for
4 ;;;; While most of SBCL is derived from the CMU CL system, the test
5 ;;;; files (like this one) were written from scratch after the fork
8 ;;;; This software is in the public domain and is provided with
9 ;;;; absolutely no warranty. See the COPYING and CREDITS files for
10 ;;;; more information.
12 (cl:in-package
:cl-user
)
15 (let ((simple-t (make-array 35))
16 (simple-u32 (make-array 50
17 :element-type
'(unsigned-byte 32)))
18 (simple-character (make-string 44))
19 (complex-t (make-array 4 :fill-pointer
3))
20 (complex-u32 (make-array 88
22 :element-type
'(unsigned-byte 32)))
23 (complex-character (make-array 14
24 :element-type
'character
26 (assert (= (length simple-t
) 35))
27 (assert (= (length simple-u32
) 50))
28 (assert (= (length simple-character
) 44))
29 (assert (= (length complex-t
) 3))
30 (assert (= (length complex-u32
) 88))
31 (assert (= (length complex-character
) 14))
32 (vector-push-extend #\a complex-t
)
33 (assert (= (length complex-t
) 4))
34 (assert (raises-error?
(vector-push-extend #\b simple-t
))))))
36 (multiple-value-bind (fp1 index fp2 bool
)
37 (let ((a (make-array '(5) :fill-pointer
5 :adjustable
5
38 :initial-contents
'(a b c d e
))))
39 (values (fill-pointer a
)
40 (vector-push-extend 'x a
)
42 (<= (array-total-size a
) 5)))