source: trunk/source/tests/ansi-tests/bit-vector.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: 2.2 KB
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Sun Jan 26 13:03:22 2003
4;;;; Contains: Tests of type BIT-VECTOR
5
6(in-package :cl-test)
7
8(deftest bit-vector.1
9  (notnot-mv (find-class 'bit-vector))
10  t)
11
12(deftest bit-vector.2
13  (notnot-mv (typep #* 'bit-vector))
14  t)
15 
16(deftest bit-vector.3
17  (notnot-mv (typep #*00101 'bit-vector))
18  t)
19
20(deftest bit-vector.4
21  (typep #(0 1 1 1 0 0) 'bit-vector)
22  nil)
23
24(deftest bit-vector.5
25  (typep "011100" 'bit-vector)
26  nil)
27
28(deftest bit-vector.6
29  (typep 0 'bit-vector)
30  nil)
31
32(deftest bit-vector.7
33  (typep 1 'bit-vector)
34  nil)
35
36(deftest bit-vector.8
37  (typep nil 'bit-vector)
38  nil)
39
40(deftest bit-vector.9
41  (typep 'x 'bit-vector)
42  nil)
43
44(deftest bit-vector.10
45  (typep '(0 1 1 0) 'bit-vector)
46  nil)
47
48(deftest bit-vector.11
49  (typep (make-array '(2 2) :element-type 'bit
50                     :initial-element 0)
51         'bit-vector)
52  nil)
53
54(deftest bit-vector.12
55  (notnot-mv (typep #* '(bit-vector *)))
56  t)
57
58(deftest bit-vector.13
59  (notnot-mv (typep #*01101 '(bit-vector *)))
60  t)
61
62(deftest bit-vector.14
63  (notnot-mv (typep #* '(bit-vector 0)))
64  t)
65
66(deftest bit-vector.15
67  (typep #*01101 '(bit-vector 0))
68  nil)
69
70(deftest bit-vector.16
71  (typep #* '(bit-vector 5))
72  nil)
73
74(deftest bit-vector.17
75  (notnot-mv (typep #*01101 '(bit-vector 5)))
76  t)
77
78
79;;; Tests of typep on the class named bit-vector
80
81(deftest bit-vector.class.2
82  (notnot-mv (typep #* (find-class 'bit-vector)))
83  t)
84 
85(deftest bit-vector.class.3
86  (notnot-mv (typep #*00101 (find-class 'bit-vector)))
87  t)
88
89(deftest bit-vector.class.4
90  (typep #(0 1 1 1 0 0) (find-class 'bit-vector))
91  nil)
92
93(deftest bit-vector.class.5
94  (typep "011100" (find-class 'bit-vector))
95  nil)
96
97(deftest bit-vector.class.6
98  (typep 0 (find-class 'bit-vector))
99  nil)
100
101(deftest bit-vector.class.7
102  (typep 1 (find-class 'bit-vector))
103  nil)
104
105(deftest bit-vector.class.8
106  (typep nil (find-class 'bit-vector))
107  nil)
108
109(deftest bit-vector.class.9
110  (typep 'x (find-class 'bit-vector))
111  nil)
112
113(deftest bit-vector.class.10
114  (typep '(0 1 1 0) (find-class 'bit-vector))
115  nil)
116
117(deftest bit-vector.class.11
118  (typep (make-array '(2 2) :element-type 'bit
119                     :initial-element 0)
120         (find-class 'bit-vector))
121  nil)
Note: See TracBrowser for help on using the repository browser.