Changed non-conforming defconstant to defparameter forms in test code.

This commit is contained in:
2012-10-21 18:53:07 +02:00
parent a621e57d94
commit 6ee9356e15

View File

@ -671,7 +671,7 @@ element-type has to be either (unsigned-byte 8) or character."
(md5sum-stream stream))) (md5sum-stream stream)))
#+md5-testing #+md5-testing
(defconstant +rfc1321-testsuite+ (defparameter *rfc1321-testsuite*
'(("" . "d41d8cd98f00b204e9800998ecf8427e") '(("" . "d41d8cd98f00b204e9800998ecf8427e")
("a" ."0cc175b9c0f1b6a831c399e269772661") ("a" ."0cc175b9c0f1b6a831c399e269772661")
("abc" . "900150983cd24fb0d6963f7d28e17f72") ("abc" . "900150983cd24fb0d6963f7d28e17f72")
@ -685,7 +685,7 @@ element-type has to be either (unsigned-byte 8) or character."
according to the test suite in Appendix A.5 of RFC 1321") according to the test suite in Appendix A.5 of RFC 1321")
#+md5-testing #+md5-testing
(defconstant +other-testsuite+ (defparameter *other-testsuite*
'(;; From padding bug report by Edi Weitz '(;; From padding bug report by Edi Weitz
("1631901HERR BUCHHEISTERCITROEN NORD1043360796beckenbauer" . ("1631901HERR BUCHHEISTERCITROEN NORD1043360796beckenbauer" .
"d734945e5930bb28859ccd13c830358b") "d734945e5930bb28859ccd13c830358b")
@ -799,7 +799,7 @@ according to the test suite in Appendix A.5 of RFC 1321")
according to my additional test suite") according to my additional test suite")
#+md5-testing #+md5-testing
(defconstant +ascii-map+ (defparameter *ascii-map*
'((#\A . 65) (#\B . 66) (#\C . 67) (#\D . 68) (#\E . 69) (#\F . 70) '((#\A . 65) (#\B . 66) (#\C . 67) (#\D . 68) (#\E . 69) (#\F . 70)
(#\G . 71) (#\H . 72) (#\I . 73) (#\J . 74) (#\K . 75) (#\L . 76) (#\G . 71) (#\H . 72) (#\I . 73) (#\J . 74) (#\K . 75) (#\L . 76)
(#\M . 77) (#\N . 78) (#\O . 79) (#\P . 80) (#\Q . 81) (#\R . 82) (#\M . 77) (#\N . 78) (#\O . 79) (#\P . 80) (#\Q . 81) (#\R . 82)
@ -819,8 +819,8 @@ according to my additional test suite")
(loop with result = (make-array (list (length string)) (loop with result = (make-array (list (length string))
:element-type '(unsigned-byte 8)) :element-type '(unsigned-byte 8))
for char across string for char across string
for byte = (or (cdr (assoc char +ascii-map+)) for byte = (or (cdr (assoc char *ascii-map*))
(error "Missing Char in +ascii-map+: ~S" char)) (error "Missing Char in *ascii-map*: ~S" char))
for index upfrom 0 for index upfrom 0
do (setf (aref result index) byte) do (setf (aref result index) byte)
finally (return result))) finally (return result)))
@ -859,11 +859,11 @@ according to my additional test suite")
#+md5-testing #+md5-testing
(defun test-rfc1321 () (defun test-rfc1321 ()
(test-with-testsuite +rfc1321-testsuite+)) (test-with-testsuite *rfc1321-testsuite*))
#+md5-testing #+md5-testing
(defun test-other () (defun test-other ()
(test-with-testsuite +other-testsuite+)) (test-with-testsuite *other-testsuite*))
#+cmu #+cmu
(eval-when (:compile-toplevel :execute) (eval-when (:compile-toplevel :execute)