integerp.lsp 656 Bytes
Newer Older
1 2 3 4 5
;-*- Mode:     Lisp -*-
;;;; Author:   Paul Dietz
;;;; Created:  Sun Sep  7 10:18:34 2003
;;;; Contains: Tests for INTEGERP

6

7 8

(deftest integerp.error.1
9 10
  (signals-error (integerp) program-error)
  t)
11 12

(deftest integerp.error.2
13 14
  (signals-error (integerp 0 0) program-error)
  t)
15 16

(deftest integerp.error.3
17 18
  (signals-error (integerp nil nil) program-error)
  t)
19 20 21

(deftest integerp.1
  (loop for i in *integers*
sds's avatar
sds committed
22 23 24 25
        for vals = (multiple-value-list (integerp i))
        unless (and (= (length vals) 1)
                    (first vals))
        collect (cons i vals))
26 27 28
  nil)

(deftest integerp.2
pfdietz's avatar
pfdietz committed
29
  (check-type-predicate #'integerp 'integer)
30 31 32 33 34 35
  nil)