Commit c5829dea authored by pfdietz's avatar pfdietz

Added error tests for FBOUNDP; added tests for FMAKUNBOUND.

parent 3d6555c8
......@@ -39,9 +39,20 @@
(let ((g (gensym))) (fboundp (list 'setf g)))
nil)
(deftest fboundp.8
(catch-type-error (fboundp 1))
type-error)
(deftest fboundp.9
(catch-type-error (fboundp #\a))
type-error)
(deftest fboundp.10
(catch-type-error (fboundp '(foo)))
type-error)
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Tue Oct 8 00:09:14 2002
;;;; Contains: Tests for FMAKUNBOUND
(in-package :cl-test)
(deftest fmakunbound.1
(let ((g (gensym)))
(and (not (fboundp g))
(setf (symbol-function g) #'car)
(fboundp g)
(values (eq (fmakunbound g) g)
(fboundp g))))
t nil)
(deftest fmakunbound.2
(let ((g (gensym)))
(and (not (fboundp g))
(eval `(defun ,g () nil))
(fboundp g)
(values (eq (fmakunbound g) g)
(fboundp g))))
t nil)
(deftest fmakunbound.3
(let ((g (gensym)))
(and (not (fboundp g))
(eval `(defmacro ,g () nil))
(fboundp g)
(values (eq (fmakunbound g) g)
(fboundp g))))
t nil)
(deftest fmakunbound.4
(let* ((g (gensym))
(n `(setf ,g)))
(and (not (fboundp n))
(eval `(defun ,n () nil))
(fboundp n)
(values (equal (fmakunbound n) n)
(fboundp n))))
t nil)
(deftest fmakunbound.5
(catch-type-error (fmakunbound 1))
type-error)
(deftest fmakunbound.6
(catch-type-error (fmakunbound #\a))
type-error)
(deftest fmakunbound.7
(catch-type-error (fmakunbound '(x)))
type-error)
......@@ -9,6 +9,7 @@
(load "constantly.lsp")
(load "complement.lsp")
(load "fboundp.lsp")
(load "fmakunbound.lsp")
(load "function.lsp")
(load "functionp.lsp")
(load "lambda-list-keywords.lsp")
......
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