r5553: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 24 Aug 2003 20:38:08 +0000 (20:38 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 24 Aug 2003 20:38:08 +0000 (20:38 +0000)
base64-tests.lisp [deleted file]
base64.asd
debian/changelog
tests.lisp [new file with mode: 0644]

diff --git a/base64-tests.lisp b/base64-tests.lisp
deleted file mode 100644 (file)
index d1589aa..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
-;;;; *************************************************************************
-;;;; FILE IDENTIFICATION
-;;;;
-;;;; Name:          test.lisp
-;;;; Purpose:       Regression tests for cl-base64
-;;;; Programmer:    Kevin M. Rosenberg
-;;;; Date Started:  Jan 2003
-;;;;
-;;;; $Id: base64-tests.lisp,v 1.14 2003/06/12 14:05:11 kevin Exp $
-;;;; *************************************************************************
-
-(in-package #:cl-user)
-(defpackage #:base64-test
-  (:use #:cl #:kmrcl #:base64)
-  (:export #:test-base64))
-(in-package #:base64-test)
-
-(defun test-base64 ()
-  (do* ((length 0 (+ 3 length))
-       (string (make-string length) (make-string length))
-       (usb8 (make-usb8-array length) (make-usb8-array length))
-       (integer (random (expt 10 length)) (random (expt 10 length))))
-       ((>= length 300))
-    (dotimes (i length)
-      (declare (fixnum i))
-      (let ((code (random 256)))
-       (setf (schar string i) (code-char code))
-       (setf (aref usb8 i) code)))
-    
-    (do* ((columns 0 (+ columns 4)))
-        ((> columns length))
-      ;; Test against cl-base64 routines
-      (assert (= integer
-                (base64-string-to-integer
-                 (integer-to-base64-string integer :columns columns))))
-      (assert (string= string
-                      (base64-string-to-string
-                       (string-to-base64-string string :columns columns))))
-      
-      ;; Test against AllegroCL built-in routines
-      #+allegro
-      (progn
-       (assert (= integer (excl:base64-string-to-integer
-                           (integer-to-base64-string integer :columns columns))))
-       (assert (= integer (base64-string-to-integer
-                           (excl:integer-to-base64-string integer))))
-       (assert (string= (string-to-base64-string string :columns columns)
-                        (excl:usb8-array-to-base64-string usb8
-                                                          (if (zerop columns)
-                                                              nil
-                                                              columns))))
-       (assert (string= string (base64-string-to-string
-                                (excl:usb8-array-to-base64-string
-                                 usb8
-                                 (if (zerop columns)
-                                     nil
-                                     columns))))))))
-  (format t "~&All tests passed~%")
-  t)
-
-
-(defun time-routines ()
-  (let* ((str "abcdefghijklmnopqwertyu1234589jhwf2ff")
-        (usb8 (string-to-usb8-array str))
-        (int 12345678901234567890)
-        (n 50000))
-    (time-iterations n (integer-to-base64-string int))
-    #+allegro
-    (time-iterations n (excl:integer-to-base64-string int))
-    (time-iterations n (string-to-base64-string str))
-    #+allegro
-    (time-iterations n (excl:usb8-array-to-base64-string usb8))))
-
-;;(test-base64)
index ce2ad44..146e512 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Dec 2002
 ;;;;
-;;;; $Id: base64.asd,v 1.21 2003/06/12 14:05:11 kevin Exp $
+;;;; $Id: base64.asd,v 1.22 2003/08/24 20:38:08 kevin Exp $
 ;;;; *************************************************************************
 
 (in-package #:cl-user)
   ((:file "package")
    (:file "encode" :depends-on ("package"))
    (:file "decode" :depends-on ("package"))
-   (:file "base64-tests" :depends-on ("encode" "decode"))
    ))
 
 (defmethod perform ((o test-op) (c (eql (find-system 'base64))))
+  (operate 'load-op 'base64-tests)
+  (operate 'test-op 'base64-tests :force t))
+
+(defsystem base64-tests
+    :depends-on (base64)
+    :components
+    ((:file "tests")))
+
+(defmethod perform ((o test-op) (c (eql (find-system 'base64-tests))))
+  (operate 'load-op 'base64-tests)
   (or (funcall (intern (symbol-name '#:test-base64)
                       (find-package 'base64-test)))
       (error "test-op failed")))
index 64c40a8..6f159e1 100644 (file)
@@ -1,3 +1,9 @@
+cl-base64 (3.3-1) unstable; urgency=low
+
+  * Rework test loading
+
+ -- Kevin M. Rosenberg <kmr@debian.org>  Sun, 24 Aug 2003 13:40:03 -0600
+
 cl-base64 (3.2.1-1) unstable; urgency=low
 
   * New upstream
diff --git a/tests.lisp b/tests.lisp
new file mode 100644 (file)
index 0000000..dbe0741
--- /dev/null
@@ -0,0 +1,75 @@
+;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;; *************************************************************************
+;;;; FILE IDENTIFICATION
+;;;;
+;;;; Name:          test.lisp
+;;;; Purpose:       Regression tests for cl-base64
+;;;; Programmer:    Kevin M. Rosenberg
+;;;; Date Started:  Jan 2003
+;;;;
+;;;; $Id: tests.lisp,v 1.1 2003/08/24 20:38:08 kevin Exp $
+;;;; *************************************************************************
+
+(in-package #:cl-user)
+(defpackage #:base64-test
+  (:use #:cl #:kmrcl #:base64)
+  (:export #:test-base64))
+(in-package #:base64-test)
+
+(defun test-base64 ()
+  (do* ((length 0 (+ 3 length))
+       (string (make-string length) (make-string length))
+       (usb8 (make-usb8-array length) (make-usb8-array length))
+       (integer (random (expt 10 length)) (random (expt 10 length))))
+       ((>= length 300))
+    (dotimes (i length)
+      (declare (fixnum i))
+      (let ((code (random 256)))
+       (setf (schar string i) (code-char code))
+       (setf (aref usb8 i) code)))
+    
+    (do* ((columns 0 (+ columns 4)))
+        ((> columns length))
+      ;; Test against cl-base64 routines
+      (assert (= integer
+                (base64-string-to-integer
+                 (integer-to-base64-string integer :columns columns))))
+      (assert (string= string
+                      (base64-string-to-string
+                       (string-to-base64-string string :columns columns))))
+      
+      ;; Test against AllegroCL built-in routines
+      #+allegro
+      (progn
+       (assert (= integer (excl:base64-string-to-integer
+                           (integer-to-base64-string integer :columns columns))))
+       (assert (= integer (base64-string-to-integer
+                           (excl:integer-to-base64-string integer))))
+       (assert (string= (string-to-base64-string string :columns columns)
+                        (excl:usb8-array-to-base64-string usb8
+                                                          (if (zerop columns)
+                                                              nil
+                                                              columns))))
+       (assert (string= string (base64-string-to-string
+                                (excl:usb8-array-to-base64-string
+                                 usb8
+                                 (if (zerop columns)
+                                     nil
+                                     columns))))))))
+  (format t "~&All tests passed~%")
+  t)
+
+
+(defun time-routines ()
+  (let* ((str "abcdefghijklmnopqwertyu1234589jhwf2ff")
+        (usb8 (string-to-usb8-array str))
+        (int 12345678901234567890)
+        (n 50000))
+    (time-iterations n (integer-to-base64-string int))
+    #+allegro
+    (time-iterations n (excl:integer-to-base64-string int))
+    (time-iterations n (string-to-base64-string str))
+    #+allegro
+    (time-iterations n (excl:usb8-array-to-base64-string usb8))))
+
+;;(test-base64)