Commit b1f281e8 authored by pfdietz's avatar pfdietz
Browse files

Added tests for SPECIAL-OPERATOR-P

parent f0f90cfb
......@@ -1041,7 +1041,40 @@
(constantp s))
(push (list s sym 'not-constant) result)))))))
;;; special-operator-p
;;; See section
(defconstant +special-operators+
'(block let* return-from catch load-time-value setq eval-when
locally symbol-macrolet flet macrolet tagbody function
multiple-value-call the go multiple-value-prog1 throw if
progn unwind-protect labels progv let quote))
;;; All the symbols in +special-operators+ are special operators
(deftest special-operator-p.1
(loop for s in +special-operators+
unless (special-operator-p s)
collect s)
;;; None of the standard symbols except those in +special-operators+
;;; are special operators
(deftest special-operator-p.2
(let ((p (find-package "CL")))
(loop for name in *cl-symbol-names*
unless (or (member name +special-operators+ :test #'string=)
(not (special-operator-p (find-symbol name p))))
collect name))
(deftest special-operator-p.3
(classify-error (special-operator-p 1))
;;; keywordp
Supports Markdown
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