Skip to content
Snippets Groups Projects
Commit e0713e35 authored by Kevin M. Rosenberg's avatar Kevin M. Rosenberg
Browse files

r4497: Auto commit for Debian build

parent 268e0797
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;;;; Programmer: Kevin M. Rosenberg ;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Jan 2003 ;;;; Date Started: Jan 2003
;;;; ;;;;
;;;; $Id: base64-tests.lisp,v 1.9 2003/04/15 16:15:21 kevin Exp $ ;;;; $Id: base64-tests.lisp,v 1.10 2003/04/15 16:21:43 kevin Exp $
;;;; ************************************************************************* ;;;; *************************************************************************
(in-package :cl-user) (in-package :cl-user)
...@@ -19,48 +19,44 @@ ...@@ -19,48 +19,44 @@
(defun test-base64 () (defun test-base64 ()
(setq *break-on-test-failures* t) (setq *break-on-test-failures* t)
(with-tests (:name "cl-base64 tests") (do* ((length 0 (+ 3 length))
(do* ((length 0 (+ 3 length)) (string (make-string length) (make-string length))
(string (make-string length) (make-string length)) (usb8 (make-usb8-array length) (make-usb8-array length))
(usb8 (make-usb8-array length) (make-usb8-array length)) (integer (random (expt 10 length)) (random (expt 10 length))))
(integer (random (expt 10 length)) (random (expt 10 length)))) ((>= length 300))
((>= length 300))
(dotimes (i length) (dotimes (i length)
(declare (fixnum i)) (declare (fixnum i))
(let ((code (random 256))) (let ((code (random 256)))
(setf (schar string i) (code-char code)) (setf (schar string i) (code-char code))
(setf (aref usb8 i) code))) (setf (aref usb8 i) code)))
(do* ((columns 0 (+ columns 4))) (do* ((columns 0 (+ columns 4)))
((> columns length)) ((> columns length))
;; Test against cl-base64 routines ;; Test against cl-base64 routines
(test integer (base64-string-to-integer (assert (= integer (base64-string-to-integer
(integer-to-base64-string integer :columns columns)) (integer-to-base64-string integer :columns columns))))
:test #'eql) (assert (string= (base64-string-to-string
(test string (base64-string-to-string (string-to-base64-string string :columns columns))))
(string-to-base64-string string :columns columns))
:test #'string=)
;; Test against AllegroCL built-in routines ;; Test against AllegroCL built-in routines
#+allegro #+allegro
(progn (progn
(test integer (excl:base64-string-to-integer (assert (= integer (excl:base64-string-to-integer
(integer-to-base64-string integer :columns columns))) (integer-to-base64-string integer :columns columns))))
(test integer (base64-string-to-integer (assert (= integer (base64-string-to-integer
(excl:integer-to-base64-string integer))) (excl:integer-to-base64-string integer))))
(test (string-to-base64-string string :columns columns) (assert (string= (string-to-base64-string string :columns columns)
(excl:usb8-array-to-base64-string usb8 (excl:usb8-array-to-base64-string usb8
(if (zerop columns) (if (zerop columns)
nil nil
columns)) columns))))
:test #'string=) (assert (string= string (base64-string-to-string
(test string (base64-string-to-string (excl:usb8-array-to-base64-string
(excl:usb8-array-to-base64-string usb8
usb8 (if (zerop columns)
(if (zerop columns) nil
nil columns))))))))
columns))) (format t "~&All tests passed~%")
:test #'string=)))))
t) t)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;;;; Programmer: Kevin M. Rosenberg ;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Dec 2002 ;;;; Date Started: Dec 2002
;;;; ;;;;
;;;; $Id: base64.asd,v 1.18 2003/04/15 16:12:01 kevin Exp $ ;;;; $Id: base64.asd,v 1.19 2003/04/15 16:21:43 kevin Exp $
;;;; ************************************************************************* ;;;; *************************************************************************
(in-package :asdf) (in-package :asdf)
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
(pushnew :base64 cl:*features*)) (pushnew :base64 cl:*features*))
;; depends-on only needed for test-op ;; depends-on only needed for test-op
:depends-on (:kmrcl :tester) :depends-on (:kmrcl)
:components :components
((:file "package") ((:file "package")
......
...@@ -7,7 +7,7 @@ Standards-Version: 3.5.9.0 ...@@ -7,7 +7,7 @@ Standards-Version: 3.5.9.0
Package: cl-base64 Package: cl-base64
Architecture: all Architecture: all
Depends: ${shlibs:Depends}, common-lisp-controller (>= 3.47), cl-kmrcl, cl-tester Depends: ${shlibs:Depends}, common-lisp-controller (>= 3.47), cl-kmrcl
Description: Common Lisp package to encode and decode base64 with URI support Description: Common Lisp package to encode and decode base64 with URI support
This package provides highly optimized base64 encoding and decoding. This package provides highly optimized base64 encoding and decoding.
Besides conversion to and from strings, integer conversions are supported. Besides conversion to and from strings, integer conversions are supported.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment