simple-bit-vector-p.lsp 1.21 KB
Newer Older
1 2 3 4 5
;-*- Mode:     Lisp -*-
;;;; Author:   Paul Dietz
;;;; Created:  Sun Jan 26 20:20:27 2003
;;;; Contains: Tests of SIMPLE-BIT-VECTOR-P

6

7 8 9 10

(deftest simple-bit-vector-p.2
  (notnot-mv (simple-bit-vector-p #*))
  t)
sds's avatar
sds committed
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
(deftest simple-bit-vector-p.3
  (notnot-mv (simple-bit-vector-p #*00101))
  t)

(deftest simple-bit-vector-p.4
  (simple-bit-vector-p #(0 1 1 1 0 0))
  nil)

(deftest simple-bit-vector-p.5
  (simple-bit-vector-p "011100")
  nil)

(deftest simple-bit-vector-p.6
  (simple-bit-vector-p 0)
  nil)

(deftest simple-bit-vector-p.7
  (simple-bit-vector-p 1)
  nil)

(deftest simple-bit-vector-p.8
  (simple-bit-vector-p nil)
  nil)

(deftest simple-bit-vector-p.9
  (simple-bit-vector-p 'x)
  nil)

(deftest simple-bit-vector-p.10
  (simple-bit-vector-p '(0 1 1 0))
  nil)

(deftest simple-bit-vector-p.11
  (simple-bit-vector-p (make-array '(2 2) :element-type 'bit
sds's avatar
sds committed
46
                                   :initial-element 0))
47 48 49
  nil)

(deftest simple-bit-vector-p.12
50 51
  (check-type-predicate #'simple-bit-vector-p 'simple-bit-vector)
  nil)
52 53

(deftest simple-bit-vector-p.error.1
54 55
  (signals-error (simple-bit-vector-p) program-error)
  t)
56 57

(deftest simple-bit-vector-p.error.2
58 59
  (signals-error (simple-bit-vector-p #* #*) program-error)
  t)