realp.lsp 663 Bytes
Newer Older
1 2 3 4 5 6 7 8
;-*- Mode:     Lisp -*-
;;;; Author:   Paul Dietz
;;;; Created:  Sun Sep  7 08:22:06 2003
;;;; Contains: Tests of REALP

(in-package :cl-test)

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

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

(deftest realp.error.3
17 18
  (signals-error (realp nil nil) program-error)
  t)
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

(deftest realp.1
  (notnot-mv (realp 0))
  t)
  
(deftest realp.2
  (notnot-mv (realp 0.0))
  t)
  
(deftest realp.3
  (realp #c(1 2))
  nil)

(deftest realp.4
  (notnot-mv (realp 17/13))
  t)

(deftest realp.5
  (realp 'a)
  nil)

(deftest realp.6
41
  (check-type-predicate #'realp 'real)
42 43 44
  nil)


45