Commit 420e8340 authored by pfdietz's avatar pfdietz
Browse files

Placeholder for compiler macro tests, and constantp tests.

parent 797fb30f
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Mon Jan 13 18:51:30 2003
;;;; Contains: Tests for compiler macros
(in-package :cl-test)
;;; Compiler macro tests will go here
\ No newline at end of file
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Mon Jan 13 19:12:17 2003
;;;; Contains: Tests for CONSTANTP
;;; See also defconstant.lsp
(in-package :cl-test)
(deftest constantp.error.1
(classify-error (constantp))
program-error)
(deftest constantp.error.2
(classify-error (constantp nil nil nil))
program-error)
(deftest constantp.1
(loop for e in *universe*
when (and (not (symbolp e))
(not (consp e))
(not (constantp e)))
collect e)
nil)
(deftest constantp.2
(notnot (constantp t))
t)
(deftest constantp.3
(notnot (constantp nil))
t)
(deftest constantp.4
(notnot (constantp :foo))
t)
(deftest constantp.5
(constantp (gensym))
nil)
(defconstant constantp-test-symbol 1)
(defmacro constantp-macro (form &environment env)
(notnot (constantp form env)))
(deftest constantp.6
(constantp-macro constantp-test-symbol)
t)
(deftest constantp.7
(constantp '(incf x))
nil)
(deftest constantp.8
(notnot (constantp 1 nil))
t)
(deftest constantp.9
(notnot (constantp ''(((foo)))))
t)
......@@ -9,6 +9,8 @@
(load "eval.lsp")
(load "eval-and-compile.lsp")
(load "compile.lsp")
(load "compiler-macros.lsp")
(load "constantp.lsp")
(load "lambda.lsp")
;;; Tests of data and control flow
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment