From 71d6817400cc07beab32b335658c637f1d1e6ffd Mon Sep 17 00:00:00 2001
From: pfdietz <pfdietz@localhost>
Date: Mon, 1 Nov 2004 03:55:08 +0000
Subject: [PATCH] Added some tests for typep on REAL type specifiers

---
 ansi-tests/load-numbers.lsp |  2 ++
 ansi-tests/real.lsp         | 34 ++++++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 ansi-tests/real.lsp

diff --git a/ansi-tests/load-numbers.lsp b/ansi-tests/load-numbers.lsp
index 2b4a8c05..0173ba58 100644
--- a/ansi-tests/load-numbers.lsp
+++ b/ansi-tests/load-numbers.lsp
@@ -108,3 +108,5 @@
 (load "oddp.lsp")
 
 (load "epsilons.lsp")
+(load "real.lsp")
+
diff --git a/ansi-tests/real.lsp b/ansi-tests/real.lsp
new file mode 100644
index 00000000..3e4f588e
--- /dev/null
+++ b/ansi-tests/real.lsp
@@ -0,0 +1,34 @@
+;-*- Mode:     Lisp -*-
+;;;; Author:   Paul Dietz
+;;;; Created:  Sun Oct 31 21:41:49 2004
+;;;; Contains: Additional tests of the REAL type specifier
+
+(in-package :cl-test)
+
+(deftest real.1
+  (loop for i = 1 then (ash i 1)
+	for tp = `(real 0 ,i)
+	repeat 200
+	unless (and (not (typep -1 tp))
+		    (not (typep -0.0001 tp))
+		    (typep 0 tp)
+		    (typep 0.0001 tp)
+		    (typep 1 tp)
+		    (typep i tp)
+		    (not (typep (1+ i) tp)))
+	collect (list i tp))
+  nil)
+
+(deftest real.2
+  (loop for i = 1 then (ash i 1)
+	for tp = `(real ,(- i) 0)
+	repeat 200
+	unless (and (not (typep (- -1 i) tp))
+		    (typep (- i) tp)
+		    (typep -1 tp)
+		    (typep 0 tp)
+		    (not (typep 1 tp))
+		    (not (typep i tp))
+		    (not (typep (1+ i) tp)))
+	collect (list i tp))
+  nil)
-- 
GitLab