Commit 229badbf authored by pfdietz's avatar pfdietz

Tests for BIT-VECTOR-P and SIMPLE-BIT-VECTOR-P.

parent 1f1fa182
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Sun Jan 26 20:16:50 2003
;;;; Contains: Tests of BIT-VECTOR-P
(in-package :cl-test)
(deftest bit-vector-p.2
(notnot-mv (bit-vector-p #*))
t)
(deftest bit-vector-p.3
(notnot-mv (bit-vector-p #*00101))
t)
(deftest bit-vector-p.4
(bit-vector-p #(0 1 1 1 0 0))
nil)
(deftest bit-vector-p.5
(bit-vector-p "011100")
nil)
(deftest bit-vector-p.6
(bit-vector-p 0)
nil)
(deftest bit-vector-p.7
(bit-vector-p 1)
nil)
(deftest bit-vector-p.8
(bit-vector-p nil)
nil)
(deftest bit-vector-p.9
(bit-vector-p 'x)
nil)
(deftest bit-vector-p.10
(bit-vector-p '(0 1 1 0))
nil)
(deftest bit-vector-p.11
(bit-vector-p (make-array '(2 2) :element-type 'bit
:initial-element 0))
nil)
(deftest bit-vector-p.12
(loop for e in *universe*
for p1 = (typep e 'bit-vector)
for p2 = (bit-vector-p e)
always (if p1 p2 (not p2)))
t)
(deftest bit-vector-p.error.1
(classify-error (bit-vector-p))
program-error)
(deftest bit-vector-p.error.2
(classify-error (bit-vector-p #* #*))
program-error)
......@@ -175,6 +175,8 @@
(load "bit-orc2.lsp")
(load "bit-xor.lsp")
(load "bit-not.lsp")
(load "bit-vector-p.lsp")
(load "simple-bit-vector-p.lsp")
;;; Tests of packages
......
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Sun Jan 26 20:20:27 2003
;;;; Contains: Tests of SIMPLE-BIT-VECTOR-P
(in-package :cl-test)
(deftest simple-bit-vector-p.2
(notnot-mv (simple-bit-vector-p #*))
t)
(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
:initial-element 0))
nil)
(deftest simple-bit-vector-p.12
(loop for e in *universe*
for p1 = (typep e 'simple-bit-vector)
for p2 = (simple-bit-vector-p e)
always (if p1 p2 (not p2)))
t)
(deftest simple-bit-vector-p.error.1
(classify-error (simple-bit-vector-p))
program-error)
(deftest simple-bit-vector-p.error.2
(classify-error (simple-bit-vector-p #* #*))
program-error)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment