2
;;;; Author: Paul Dietz
3
;;;; Created: Thu Oct 10 23:05:39 2002
4
;;;; Contains: Tests of DEFCONSTANT
8
(defconstant test-constant-1 17)
10
(deftest defconstant.1
11
(symbol-value 'test-constant-1)
14
(deftest defconstant.2
15
(notnot-mv (constantp 'test-constant-1))
18
(deftest defconstant.3
19
(documentation 'test-constant-1 'variable)
22
(defconstant test-constant-2 'a
23
"This is the documentation.")
25
(deftest defconstant.4
26
(documentation 'test-constant-2 'variable)
27
"This is the documentation.")
29
(deftest defconstant.5
30
(defconstant test-constant-3 0)
33
;;; (deftest defconstant.error.1
34
;;; (signals-error (defconstant) program-error)
37
;;; (deftest defconstant.error.2
38
;;; (signals-error (defconstant +ignorable-constant-name+) program-error)
41
;;; (deftest defconstant.error.3
42
;;; (signals-error (defconstant +ignorable-constant-name2+ nil
43
;;; "This is a docstring"
44
;;; "This is an unnecessary extra argument.")
48
(deftest defconstant.error.1
49
(signals-error (funcall (macro-function 'defconstant))
53
(deftest defconstant.error.2
54
(signals-error (funcall (macro-function 'defconstant)
55
'(defconstant +nonexistent-constant+ 0))
59
(deftest defconstant.error.3
60
(signals-error (funcall (macro-function 'defconstant)
61
'(defconstant +nonexistent-constant+ 0)