Commit 8ea11d00 authored by pfdietz's avatar pfdietz

More changes to array tests.

parent 549208d5
......@@ -40,8 +40,11 @@
type-error)
(deftest adjustable-array-p.error.4
(loop for e in *mini-universe*
unless (or (typep e 'array)
(eq 'type-error (classify-error** `(adjustable-array-p ',e))))
collect e)
(let (why)
(loop for e in *mini-universe*
unless (or (typep e 'array)
(eq 'type-error
(setq why (classify-error**
`(adjustable-array-p ',e)))))
collect (list e why)))
nil)
......@@ -50,9 +50,11 @@
program-error)
(deftest array-dimensions.error.3
(loop for e in *mini-universe*
unless (or (typep e 'array)
(eq 'type-error
(classify-error** `(array-dimensions ',e))))
collect e)
(let (why)
(loop for e in *mini-universe*
unless (or (typep e 'array)
(eq 'type-error
(setq why (classify-error**
`(array-dimensions ',e)))))
collect (list e why)))
nil)
......@@ -105,9 +105,11 @@
program-error)
(deftest array-displacement.error.3
(loop for e in *mini-universe*
unless (or (typep e 'array)
(eq 'type-error
(classify-error** `(array-displacement ',e))))
collect e)
(let (why)
(loop for e in *mini-universe*
unless (or (typep e 'array)
(eq 'type-error
(setq why (classify-error**
`(array-displacement ',e)))))
collect (list e why)))
nil)
......@@ -38,23 +38,15 @@
program-error)
(deftest array-total-size.error.3
(loop for e in *mini-universe*
when (and (not (typep e 'array))
(not (eql (classify-error** `(array-total-size ',e))
'type-error)))
collect e)
(let (why)
(loop for e in *mini-universe*
when (and (not (typep e 'array))
(not (eql (setq why
(classify-error** `(array-total-size ',e)))
'type-error)))
collect (list e why)))
nil)
(deftest array-total-size.error.4
(classify-error (array-total-size 0))
type-error)
......@@ -24,7 +24,35 @@
a))
5 6 #(1 2 3 4 5 6))
;;; Error tests
(deftest fill-pointer.error.1
(classify-error (fill-pointer))
program-error)
(deftest fill-pointer.error.2
(classify-error (fill-pointer (make-array '(10) :fill-pointer 4)
nil))
program-error)
(deftest fill-pointer.error.3
(classify-error (fill-pointer (make-array '(10) :fill-pointer nil)))
type-error)
(deftest fill-pointer.error.4
(classify-error (fill-pointer #0aNIL))
type-error)
(deftest fill-pointer.error.5
(classify-error (fill-pointer #2a((a b c)(d e f))))
type-error)
(deftest fill-pointer.error.6
(let (why)
(loop for e in *mini-universe*
when (and (or (not (typep e 'vector))
(not (array-has-fill-pointer-p e)))
(not (eql (setq why (classify-error** `(fill-pointer ',e)))
'type-error)))
collect (list e why)))
nil)
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