Commit c62e802b authored by pfdietz's avatar pfdietz

Broke out symbol-function tests into their own file, and completed them

parent ed690393
......@@ -3,12 +3,13 @@
;; (load "cl-symbol-names.lsp") ;; moved to gclload1.lsp
(load "cl-symbols.lsp")
(load "symbolp.lsp")
(load "boundp.lsp")
(load "keywordp.lsp")
(load "make-symbol.lsp")
(load "copy-symbol.lsp")
(load "gensym.lsp")
(load "gentemp.lsp")
(load "keywordp.lsp")
(load "make-symbol.lsp")
(load "symbol-function.lsp")
(load "boundp.lsp")
(load "symbol-name.lsp")
(load "special-operator-p.lsp")
(load "set.lsp")
......
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Tue Jul 13 07:38:43 2004
;;;; Contains: Tests of SYMBOL-FUNCTION
(in-package :cl-test)
(deftest symbol-function.1
(let ((sym (gensym))
(f #'(lambda () (values 1 2 3))))
(values
(eqt (setf (symbol-function sym) f) f)
(multiple-value-list (eval (list sym)))))
t (1 2 3))
;;; Error cases
(deftest symbol-function.error.1
(signals-error (symbol-function) program-error)
t)
(deftest symbol-function.error.2
(signals-error (symbol-function 'cons nil) program-error)
t)
(deftest symbol-function.error.3
(loop for x in *mini-universe*
for form = `(signals-error (symbol-function ',x) type-error)
unless (or (symbolp x) (eval form))
collect x)
nil)
(deftest symbol-function.error.4
(loop for x in *mini-universe*
for form = `(signals-error (setf (symbol-function ',x) #'identity)
type-error)
unless (or (symbolp x) (eval form))
collect x)
nil)
(deftest symbol-function.error.5
(let ((sym (gensym)))
(eval `(signals-error (symbol-function ',sym) undefined-function)))
t)
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