Commit d1b3cf56 authored by pfdietz's avatar pfdietz

Added missing error tests for symbol-package, symbol-plist, and symbol-value

parent 6e539d91
......@@ -1137,14 +1137,6 @@
;;; Various error cases for symbol-related functions
(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-package.error.1
(signals-error (symbol-package) program-error)
t)
......@@ -1153,6 +1145,14 @@
(signals-error (symbol-package 'cons nil) program-error)
t)
(deftest symbol-package.error.3
(loop for x in *mini-universe*
for form = `(signals-error (symbol-package ',x) type-error)
unless (or (symbolp x) (eval form))
collect x)
nil)
(deftest symbol-plist.error.1
(signals-error (symbol-plist) program-error)
t)
......@@ -1161,6 +1161,24 @@
(signals-error (symbol-plist 'cons nil) program-error)
t)
(deftest symbol-plist.error.3
(loop for x in *mini-universe*
for form = `(signals-error (symbol-plist ',x) type-error)
unless (or (symbolp x) (eval form))
collect x)
nil)
(deftest symbol-plist.error,4
(loop for x in *mini-universe*
for form = `(signals-error (setf (symbol-plist ',x)
(find-package "CL-USER"))
type-error)
unless (or (symbolp x) (eval form))
collect x)
nil)
(deftest symbol-value.error.1
(signals-error (symbol-value) program-error)
t)
......@@ -1168,3 +1186,20 @@
(deftest symbol-value.error.2
(signals-error (symbol-value '*package* nil) program-error)
t)
(deftest symbol-value.error.3
(loop for x in *mini-universe*
for form = `(signals-error (symbol-value ',x) type-error)
unless (or (symbolp x) (eval form))
collect x)
nil)
(deftest symbol-value.error.4
(loop for x in *mini-universe*
for form = `(signals-error (setf (symbol-value ',x) nil)
type-error)
unless (or (symbolp x) (eval form))
collect x)
nil)
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