diff --git a/ansi-tests/load-numbers.lsp b/ansi-tests/load-numbers.lsp index 2b4a8c0567b69699c42088df7143ea2762856d91..0173ba58b7f6533d39b75e50c758d5323d3d9429 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 0000000000000000000000000000000000000000..3e4f588ee54a6b556a3b850dc0e5967d7142b3ba --- /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)