Skip to content
Snippets Groups Projects
Commit 71d68174 authored by pfdietz's avatar pfdietz
Browse files

Added some tests for typep on REAL type specifiers

parent 593788c3
No related branches found
No related tags found
No related merge requests found
...@@ -108,3 +108,5 @@ ...@@ -108,3 +108,5 @@
(load "oddp.lsp") (load "oddp.lsp")
(load "epsilons.lsp") (load "epsilons.lsp")
(load "real.lsp")
;-*- 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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment