Commit ce325a3d authored by pfdietz's avatar pfdietz

Modified to run under Lispworks, which unfortunately already had a package...

Modified to run under Lispworks, which unfortunately already had a package (nick)named RT.  Changed the regression test package to be REGRESSION-TEST, and make the RT nickname be available only with #-lispworks.  Removed a bunch of gratuitous use-package forms.  Added lispworks binary filenames to .cvsignore and make clean.  Added a test to MAKE-SYMBOL that illustrates a place where Lispworks is noncomplant (this is related to the failure on MAKE-SYMBOL.ERROR.8)
parent ffabd0cb
......@@ -4,7 +4,6 @@
;;;; Contains: Aux. functions for CL-TEST
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
......@@ -287,7 +286,7 @@ the condition to go uncaught if it cannot be classified."
(muffle-warning))))
(proclaim '(optimize (safety 3)))
(classify-error*
(if rt::*compile-tests*
(if regression-test::*compile-tests*
(funcall (compile nil `(lambda ()
(declare (optimize (safety 3)))
,form)))
......
......@@ -5,7 +5,6 @@
;;;; and symbol-related functions
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
......@@ -1103,27 +1102,27 @@
;;; symbol-name
(deftest symbol-name.1
(safe-symbol-name '|ABCD|)
(symbol-name '|ABCD|)
"ABCD")
(deftest symbol-name.2
(safe-symbol-name '|1234abcdABCD|)
(symbol-name '|1234abcdABCD|)
"1234abcdABCD")
(deftest symbol-name.3
(safe-symbol-name 1)
(classify-error (symbol-name 1))
type-error)
(deftest symbol-name.4
(safe-symbol-name '(a))
(classify-error (symbol-name '(a)))
type-error)
(deftest symbol-name.5
(safe-symbol-name "ABCDE")
(classify-error (symbol-name "ABCDE"))
type-error)
(deftest symbol-name.6
(safe-symbol-name 12913.0213)
(classify-error (symbol-name 12913.0213))
type-error)
(deftest symbol-name.7
......@@ -1179,7 +1178,7 @@
nil)
(deftest make-symbol.10
(symbol-name (safe-make-symbol ""))
(symbol-name (make-symbol ""))
"")
(deftest make-symbol.order.1
......@@ -1190,35 +1189,35 @@
"ABC" 1)
(deftest make-symbol.error.1
(safe-make-symbol nil)
(classify-error (make-symbol nil))
type-error)
(deftest make-symbol.error.2
(safe-make-symbol 'a)
(classify-error (make-symbol 'a))
type-error)
(deftest make-symbol.error.3
(safe-make-symbol 1)
(classify-error (make-symbol 1))
type-error)
(deftest make-symbol.error.4
(safe-make-symbol -1)
(classify-error (make-symbol -1))
type-error)
(deftest make-symbol.error.5
(safe-make-symbol 1.213)
(classify-error (make-symbol 1.213))
type-error)
(deftest make-symbol.error.6
(safe-make-symbol -1312.2)
(classify-error (make-symbol -1312.2))
type-error)
(deftest make-symbol.error.7
(safe-make-symbol #\w)
(classify-error (make-symbol #\w))
type-error)
(deftest make-symbol.error.8
(safe-make-symbol '(a))
(classify-error (make-symbol '(a)))
type-error)
(deftest make-symbol.error.9
......@@ -1229,6 +1228,10 @@
(classify-error (make-symbol "a" "a"))
program-error)
(deftest make-symbol.error.11
(classify-error (make-symbol '(#\a #\b #\c)))
type-error)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; copy-symbol
......
......@@ -4,7 +4,7 @@
;;;; Contains: CL test case package definition
(defpackage :cl-test
(:use :cl :rt)
(:use :cl :regression-test)
#+gcl (:use defpackage)
(:nicknames)
(:import-from "COMMON-LISP-USER" "COMPILE-AND-LOAD" "==>")
......
......@@ -4,7 +4,6 @@
;;;; Contains: Testing of CL Features related to "CONS", part 1
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
......
......@@ -4,7 +4,6 @@
;;;; Contains: Testing of CL Features related to "CONS", part 2
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
......
......@@ -4,7 +4,7 @@
;;;; Contains: Testing of CL Features related to "CONS", part 3
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
......
......@@ -4,7 +4,6 @@
;;;; Contains: Testing of CL Features related to "CONS", part 4
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
......
......@@ -4,7 +4,6 @@
;;;; Contains: Testing of CL Features related to "CONS", part 5
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
......
......@@ -4,7 +4,6 @@
;;;; Contains: Testing of CL Features related to "CONS", part 6
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
......
......@@ -4,7 +4,6 @@
;;;; Contains: Testing of CL Features related to "CONS", part 7
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
......
......@@ -4,7 +4,6 @@
;;;; Contains: Testing of CL Features related to "CONS", part 8
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
......
......@@ -4,7 +4,7 @@
;;;; Contains: Testing of CL Features related to "CONS", part 9
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
......
......@@ -4,7 +4,7 @@
;;;; Contains: Testing of CL Features related to "CONS", part 10
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
......
......@@ -4,7 +4,7 @@
;;;; Contains: Testing of CL Features related to "CONS", part 11
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
......
......@@ -4,7 +4,7 @@
;;;; Contains: Testing of CL Features related to "CONS", part 12
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
......
......@@ -4,7 +4,7 @@
;;;; Contains: Testing of CL Features related to "CONS", part 13
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
......
......@@ -4,7 +4,7 @@
;;;; Contains: Testing of CL Features related to "CONS", part 14
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
......
......@@ -4,7 +4,7 @@
;;;; Contains: Testing of CL Features related to "CONS", part 15
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
......
......@@ -4,7 +4,7 @@
;;;; Contains: Testing of CL Features related to "CONS", part 16
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
......
......@@ -4,7 +4,7 @@
;;;; Contains: Testing of CL Features related to "CONS", part 17
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
(defun rev-assoc-list (x)
......
......@@ -4,7 +4,7 @@
;;;; Contains: Testing of CL Features related to "CONS", part 18
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
......
......@@ -4,7 +4,7 @@
;;;; Contains: Testing of CL Features related to "CONS", part 19
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
......
......@@ -4,7 +4,7 @@
;;;; Contains: Testing of CL Features related to "CONS", part 20
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
......
......@@ -4,7 +4,7 @@
;;;; Contains: Testing of CL Features related to "CONS", part 21
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
......
......@@ -4,7 +4,7 @@
;;;; Contains: Testing of CL Features related to "CONS", part 22
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
......
......@@ -4,7 +4,7 @@
;;;; Contains: Testing of CL Features related to "CONS", part 23
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
......
......@@ -4,7 +4,7 @@
;;;; Contains: Testing of CL Features related to "CONS", part 24
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
......
......@@ -4,7 +4,7 @@
;;;; Contains: Testing of CL Features related to "CONS", part 25
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
......
(load "gclload1.lsp")
(load "gclload2.lsp")
(in-package :cl-test)
(rt:do-tests)
(regression-test:do-tests)
......@@ -6,4 +6,4 @@ test-unixport:
echo "(load \"gclload.lsp\")" | ../unixport/saved_ansi_gcl | tee test.out
clean:
rm -f test.out *.fasl *.o *.so *~ *.fn *.x86f *.fasl
rm -f test.out *.fasl *.o *.so *~ *.fn *.x86f *.fasl *.ufsl
......@@ -4,12 +4,11 @@
;;;; Contains: Tests on readtables (just started, very incomplete)
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
(deftest readtable-valid (not (readtablep *readtable*)) nil)
(deftest readtablep-1
(deftest readtablep.1
(and (not (readtablep nil))
(not (readtablep 'a))
(not (readtablep 0))
......@@ -36,17 +35,17 @@
)
t)
(deftest read-symbol-1
(deftest read-symbol.1
(let ((*package* (find-package "CL-TEST")))
(ignore-errors (read-from-string "a")))
a 1)
(deftest read-symbol-2
(deftest read-symbol.2
(let ((*package* (find-package "CL-TEST")))
(ignore-errors (read-from-string "|a|")))
|a| 3)
(deftest read-symbol-3
(deftest read-symbol.3
(multiple-value-bind (s n)
(ignore-errors (read-from-string "#:abc"))
(not
......@@ -56,7 +55,7 @@
(string-equal (symbol-name s) "abc"))))
nil)
(deftest read-symbol-4
(deftest read-symbol.4
(multiple-value-bind (s n)
(ignore-errors (read-from-string "#:|abc|"))
(not
......@@ -66,7 +65,7 @@
(string= (symbol-name s) "abc"))))
nil)
(deftest read-symbol-5
(deftest read-symbol.5
(multiple-value-bind (s n)
(ignore-errors (read-from-string "#:||"))
(if (not (symbolp s))
......@@ -77,7 +76,7 @@
(string= (symbol-name s) ""))))))
t)
(deftest read-symbol-6
(deftest read-symbol.6
(let ((str "cl-test::abcd0123"))
(multiple-value-bind (s n)
(ignore-errors (read-from-string str))
......@@ -90,7 +89,7 @@
"abcd0123")))))))
t)
(deftest read-symbol-7
(deftest read-symbol.7
(multiple-value-bind (s n)
(ignore-errors (read-from-string ":ABCD"))
(if (not (symbolp s))
......@@ -102,7 +101,7 @@
"ABCD"))))))
t)
(defun read-symbol-9-body (natoms maxlen)
(defun read-symbol.9-body (natoms maxlen)
(let* ((chars (concatenate 'string
"abcdefghijklmnopqrstuvwxyz"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
......@@ -136,11 +135,11 @@
actual-string s2 sym :readably t)
t)))))))
(deftest read-symbol-9
(read-symbol-9-body 1000 100)
(deftest read-symbol.9
(read-symbol.9-body 1000 100)
0)
(deftest read-symbol-10
(deftest read-symbol.10
(handler-case
(not (not
(equal (symbol-name
......
......@@ -6,8 +6,9 @@
(eval-when
;;(:execute :compile-toplevel :load-toplevel)
(load eval compile)
(defpackage :rt
(defpackage :regression-test
(:use :cl)
(:nicknames :rtest #-lispworks :rt)
(:export
"*DO-TESTS-WHEN-DEFINED*"
"*TEST*"
......@@ -21,4 +22,4 @@
"REM-TEST"
)))
(in-package :rt)
(in-package :regression-test)
......@@ -27,7 +27,7 @@
(in-package :user)
;; (require "RT")
(use-package :rt)
(use-package :regression-tes)
(defmacro setup (&rest body)
`(do-setup '(progn ., body)))
......@@ -35,9 +35,9 @@
(defun do-setup (form)
(let ((*test* nil)
(*do-tests-when-defined* nil)
(rt::*entries* (list nil))
(rt::*in-test* nil)
(rt::*debug* t)
(regression-test::*entries* (list nil))
(regression-test::*in-test* nil)
(regression-test::*debug* t)
result)
(deftest t1 4 4)
(deftest (t 2) 4 3)
......@@ -46,7 +46,7 @@
(with-output-to-string (*standard-output*)
(setq result
(multiple-value-list
(catch 'rt::*debug* (eval form))))))
(catch 'regression-test::*debug* (eval form))))))
result))))
(defun normalize (string)
......
......@@ -23,7 +23,7 @@
;This is the December 19, 1990 version of the regression tester.
(in-package :rt)
(in-package :regression-test)
(defvar *test* nil "Current test name")
(defvar *do-tests-when-defined* nil)
......
......@@ -6,7 +6,6 @@
;; We should check for every type that NIL is a subtype, and T a supertype
(in-package :cl-test)
(use-package :rt)
(declaim (optimize (safety 3)))
......
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