207 |
(7 7) |
(7 7) |
208 |
(nil))) |
(nil))) |
209 |
|
|
210 |
|
(deftest position-if-not-vector.13 |
211 |
|
(let ((a (make-array '(10) :initial-contents '(1 2 3 4 5 a b c d e) |
212 |
|
:fill-pointer 5))) |
213 |
|
(values |
214 |
|
(position-if-not #'numberp a) |
215 |
|
(position-if-not #'symbolp a) |
216 |
|
(position-if-not #'numberp a :from-end t) |
217 |
|
(position-if-not #'symbolp a :from-end t))) |
218 |
|
nil 0 nil 4) |
219 |
|
|
220 |
;;; Bit vector tests |
;;; Bit vector tests |
221 |
|
|
222 |
(deftest position-if-not-bit-vector.1 |
(deftest position-if-not-bit-vector.1 |
319 |
(7 7) |
(7 7) |
320 |
(nil))) |
(nil))) |
321 |
|
|
322 |
|
(deftest position-if-not-bit-vector.13 |
323 |
|
(let ((a (make-array '(10) :initial-contents '(1 1 1 1 1 0 0 0 0 0) |
324 |
|
:fill-pointer 5 |
325 |
|
:element-type 'bit))) |
326 |
|
(values |
327 |
|
(position-if-not #'zerop a) |
328 |
|
(position-if-not (complement #'zerop) a) |
329 |
|
(position-if-not #'zerop a :from-end t) |
330 |
|
(position-if-not (complement #'zerop) a :from-end t))) |
331 |
|
0 nil 4 nil) |
332 |
|
|
333 |
;;; string tests |
;;; string tests |
334 |
|
|
335 |
(deftest position-if-not-string.1 |
(deftest position-if-not-string.1 |
432 |
(7 7) |
(7 7) |
433 |
(nil))) |
(nil))) |
434 |
|
|
435 |
|
(deftest position-if-not-string.13 |
436 |
|
(let ((a (make-array '(10) :initial-contents (coerce "55555aaaaa" 'list) |
437 |
|
:fill-pointer 5 |
438 |
|
:element-type 'character))) |
439 |
|
(and (stringp a) |
440 |
|
(values |
441 |
|
(position-if-not #'digit-char-p a) |
442 |
|
(position-if-not (complement #'digit-char-p) a) |
443 |
|
(position-if-not #'digit-char-p a :from-end t) |
444 |
|
(position-if-not (complement #'digit-char-p) a :from-end t)))) |
445 |
|
nil 0 nil 4) |
446 |
|
|
447 |
;;; Error tests |
;;; Error tests |
448 |
|
|
449 |
(deftest position-if-not-error.1 |
(deftest position-if-not-error.1 |