source: trunk/source/tests/ansi-tests/array-has-fill-pointer-p.lsp @ 8991

Last change on this file since 8991 was 8991, checked in by gz, 12 years ago

Check in the gcl ansi test suite (original, in preparation for making local changes)

File size: 1.3 KB
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Contains: Tests of the function ARRAY-HAS-FILL-POINTER-P
4
5(in-package :cl-test)
6
7;;; Many tests are in other files, incidental to testing of
8;;; other things
9
10(deftest array-has-fill-pointer-p.1
11  (array-has-fill-pointer-p #0a1)
12  nil)
13
14(deftest array-has-fill-pointer-p.2
15  (array-has-fill-pointer-p #2a((a b)(c d)))
16  nil)
17
18(deftest array-has-fill-pointer-p.3
19  (array-has-fill-pointer-p #3a(((a))))
20  nil)
21
22(deftest array-has-fill-pointer-p.4
23  (array-has-fill-pointer-p #4a((((a)))))
24  nil)
25
26(deftest array-has-fill-pointer-p.5
27  (macrolet
28   ((%m (z) z))
29   (array-has-fill-pointer-p (expand-in-current-env (%m #2a((a b)(c d))))))
30  nil)
31
32(deftest array-has-fill-pointer-p.order.1
33  (let ((i 0))
34    (array-has-fill-pointer-p (progn (incf i) #(a b c)))
35    i)
36  1)
37
38;;; Error tests
39
40(deftest array-has-fill-pointer-p.error.1
41  (signals-error (array-has-fill-pointer-p) program-error)
42  t)
43
44(deftest array-has-fill-pointer-p.error.2
45  (signals-error (array-has-fill-pointer-p #(a b c) nil) program-error)
46  t)
47
48(deftest array-has-fill-pointer-p.error.3
49  (check-type-error #'array-has-fill-pointer-p #'arrayp)
50  nil)
51
52(deftest array-has-fill-pointer-p.error.4
53  (signals-type-error x nil (array-has-fill-pointer-p x))
54  t)
55
56
Note: See TracBrowser for help on using the repository browser.