From 6ee2649e0439f0ac424ad39b273f52186052345f Mon Sep 17 00:00:00 2001
From: pfdietz <pfdietz@localhost>
Date: Mon, 16 May 2005 12:53:26 +0000
Subject: [PATCH] Documentation tests, and test that a NOTINLINE declaration
 inhibits compiler macro expansion

---
 ansi-tests/define-compiler-macro.lsp | 41 +++++++++++++++++++++++++++-
 1 file changed, 40 insertions(+), 1 deletion(-)

diff --git a/ansi-tests/define-compiler-macro.lsp b/ansi-tests/define-compiler-macro.lsp
index 2d9d993a..8026dd31 100644
--- a/ansi-tests/define-compiler-macro.lsp
+++ b/ansi-tests/define-compiler-macro.lsp
@@ -113,5 +113,44 @@
 	 (list (funcall fn arg 'y) arg)))))
   t t t t a (z (z 2)) (y (y 2)))
 
+;;; Test of documentation
 
-     
\ No newline at end of file
+(deftest define-compiler-macro.5
+  (let* ((sym (gensym))
+	 (form `(define-compiler-macro ,sym (x) "DCM.5" x))
+	 (form2 `(defun ,sym (x) "DCM.5-WRONG" x)))
+    (eval form)
+    (eval form2)
+    (or (documentation sym 'compiler-macro) "DCM.5"))
+  "DCM.5")
+
+(deftest define-compiler-macro.6
+  (let* ((sym (gensym))
+	 (form `(define-compiler-macro ,sym (x) "DCM.6" x))
+	 (form2 `(defun ,sym (x) "DCM.6-WRONG" x)))
+    (eval form2)
+    (eval form)
+    (or (documentation sym 'compiler-macro) "DCM.6"))
+  "DCM.6")
+
+;;; NOTINLINE turns off a compiler macro
+
+(deftest define-compiler-macro.7
+  (let* ((sym (gensym))
+	 (form `(define-compiler-macro ,sym (x y)
+		  (declare (special *x*))
+		  (setf *x* :bad)
+		  `(list ,x ,y)))
+	 (form2 `(defun ,sym (x y) (list x y))))
+    (eval form)
+    (eval form2)
+    (compile sym)
+    (let ((*x* :good))
+      (declare (special *x*))
+      (values
+       (funcall (compile nil `(lambda (a b)
+				(declare (notinline ,sym))
+				(,sym a b)))
+		5 11)
+       *x*)))
+  (5 11) :good)
-- 
GitLab