File: arrayp.lsp

package info (click to toggle)
cl-ansi-tests 20060621-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 6,976 kB
  • ctags: 22,030
  • sloc: lisp: 134,790; makefile: 155
file content (53 lines) | stat: -rw-r--r-- 920 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
;-*- Mode:     Lisp -*-
;;;; Author:   Paul Dietz
;;;; Created:  Tue Jan 21 22:08:21 2003
;;;; Contains: Tests of ARRAYP

(in-package :cl-test)

;;; Also tested by make-array.lsp

(deftest arrayp.1
  (notnot-mv (arrayp #(a b c)))
  t)

(deftest arrayp.2
  (notnot-mv (arrayp "abcd"))
  t)

(deftest arrayp.3
  (notnot-mv (arrayp #*001110101))
  t)

(deftest arrayp.4
  (notnot-mv (arrayp #0aNIL))
  t)

(deftest arrayp.5
  (notnot-mv (arrayp #2a((1 2 3)(4 5 6))))
  t)

(deftest arrayp.6
  (check-type-predicate #'arrayp 'array)
  nil)

(deftest arrayp.7
  (macrolet ((%m (z) z)) (arrayp (expand-in-current-env (%m 0))))
  nil)

(deftest arrayp.order.1
  (let ((i 0) a)
    (values
     (arrayp (progn (setf a (incf i)) nil))
     i a))
  nil 1 1)

;;; Error tests

(deftest arrayp.error.1
  (signals-error (arrayp) program-error)
  t)

(deftest arrayp.error.2
  (signals-error (arrayp #(a b c) nil) program-error)
  t)