simple-bit-vector.lsp 1.43 KB
Newer Older
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
;-*- Mode:     Lisp -*-
;;;; Author:   Paul Dietz
;;;; Created:  Sun Jan 26 13:12:07 2003
;;;; Contains: Tests for type SIMPLE-BIT-VECTOR

(in-package :cl-test)

(deftest simple-bit-vector.2
  (notnot-mv (typep #* 'simple-bit-vector))
  t)
  
(deftest simple-bit-vector.3
  (notnot-mv (typep #*00101 'simple-bit-vector))
  t)

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

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

(deftest simple-bit-vector.6
  (typep 0 'simple-bit-vector)
  nil)

(deftest simple-bit-vector.7
  (typep 1 'simple-bit-vector)
  nil)

(deftest simple-bit-vector.8
  (typep nil 'simple-bit-vector)
  nil)

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

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

(deftest simple-bit-vector.11
  (typep (make-array '(2 2) :element-type 'bit
		     :initial-element 0)
	 'simple-bit-vector)
  nil)

(deftest simple-bit-vector.12
  (notnot-mv (typep #* '(simple-bit-vector *)))
  t)

(deftest simple-bit-vector.13
  (notnot-mv (typep #*01101 '(simple-bit-vector *)))
  t)

(deftest simple-bit-vector.14
  (notnot-mv (typep #* '(simple-bit-vector 0)))
  t)

(deftest simple-bit-vector.15
  (typep #*01101 '(simple-bit-vector 0))
  nil)

(deftest simple-bit-vector.16
  (typep #* '(simple-bit-vector 5))
  nil)

(deftest simple-bit-vector.17
  (notnot-mv (typep #*01101 '(simple-bit-vector 5)))
  t)