From bc1dd8378aa19f1f00cb7ad5d135a75e7c533b63 Mon Sep 17 00:00:00 2001
From: pfdietz <pfdietz@localhost>
Date: Fri, 14 Feb 2003 14:07:22 +0000
Subject: [PATCH] Order of evaluation test for CONSTANTP.  More subtypep tests,
 on various numeric types.

---
 ansi-tests/constantp.lsp |  9 ++++++
 ansi-tests/subtypep.lsp  | 67 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 76 insertions(+)

diff --git a/ansi-tests/constantp.lsp b/ansi-tests/constantp.lsp
index 32cad912..39f650d2 100644
--- a/ansi-tests/constantp.lsp
+++ b/ansi-tests/constantp.lsp
@@ -65,4 +65,13 @@
   (notnot-mv (constantp 'pi))
   t)
 
+(deftest constantp.order.1
+  (let ((i 0) x y)
+    (values
+     (notnot (constantp (progn (setf x (incf i)) 1)
+			(progn (setf y (incf i)) nil)))
+     i x y))
+  t 2 1 2)
+
+  
 
diff --git a/ansi-tests/subtypep.lsp b/ansi-tests/subtypep.lsp
index 035e4e7f..e38c1455 100644
--- a/ansi-tests/subtypep.lsp
+++ b/ansi-tests/subtypep.lsp
@@ -247,6 +247,42 @@
    '(integer 0 15))
   nil)
 
+(deftest subtypep.integer.28
+  (check-equivalence
+   '(and integer (not (eql 10)))
+   '(or (integer * 9) (integer 11 *)))
+  nil)
+
+(deftest subtypep.integer.29
+  (check-equivalence
+   '(and integer (not (integer 1 10)))
+   '(or (integer * 0) (integer 11 *)))
+  nil)
+
+(deftest subtypep.integer.30
+  (check-equivalence
+   '(and (integer -100 100) (not (integer 1 10)))
+   '(or (integer -100 0) (integer 11 100)))
+  nil)
+
+(deftest subtypep.integer.31
+  (check-equivalence
+   '(and integer (real 4 10))
+   '(integer 4 10))
+  nil)
+
+(deftest subtypep.integer.32
+  (check-equivalence
+   '(and (integer 4 *) (real * 10))
+   '(integer 4 10))
+  nil)
+
+(deftest subtypep.integer.33
+  (check-equivalence
+   '(and (integer * 10) (real 4))
+   '(integer 4 10))
+  nil)
+
 ;;;;;;;
 
 (deftest subtypep.float.1
@@ -417,6 +453,37 @@
   nil)
 
 
+;;; SUBTYPEP on rational types
+
+(deftest subtypep.rational.1
+  (subtypep* '(rational 10 *) 'rational)
+  t t)
+
+(deftest subtypep.rational.2
+  (subtypep* '(rational 10) 'rational)
+  t t)
+
+(deftest subtypep.rational.3
+  (subtypep* '(rational * 10) 'rational)
+  t t)
+
+(deftest subtypep.rational.4
+  (subtypep '(rational 10 20) 'rational)
+  t t)
+
+(deftest subtypep.rational.5
+  (subtypep '(rational (10) 20) 'rational)
+  t t)
+
+(deftest subtypep.rational.6
+  (subtypep '(rational 10 (20)) 'rational)
+  t t)
+
+(deftest subtypep.rational.7
+  (subtypep '(rational (10) (20)) 'rational)
+  t t)
+
+
 
 
 ;;; SUBTYPEP on CONS types
-- 
GitLab