Commit d30e0cfd authored by pfdietz's avatar pfdietz

Changed classify-error forms to signals-error forms.

parent ad0560cf
......@@ -192,19 +192,20 @@
;;; (deftest case.error.1
;;; (classify-error (case))
;;; program-error)
;;; (signals-error (case) program-error)
;;; t)
(deftest case.error.1
(classify-error (funcall (macro-function 'case)))
program-error)
(signals-error (funcall (macro-function 'case))
program-error)
t)
(deftest case.error.2
(classify-error (funcall (macro-function 'case)
'(case t)))
program-error)
(signals-error (funcall (macro-function 'case) '(case t))
program-error)
t)
(deftest case.error.3
(classify-error (funcall (macro-function 'case)
'(case t) nil nil))
program-error)
\ No newline at end of file
(signals-error (funcall (macro-function 'case) '(case t) nil nil)
program-error)
t)
......@@ -83,5 +83,5 @@
good)
(deftest throw-error
(classify-error (throw (gensym) nil))
control-error)
(signals-error (throw (gensym) nil) control-error)
t)
......@@ -11,30 +11,29 @@
2)
(deftest ccase.2
(classify-error
(let ((x 1)) (ccase x)))
type-error)
(signals-error (let ((x 1)) (ccase x)) type-error)
t)
(deftest ccase.3
(classify-error
(let ((x 1))
(ccase x (a 1) (b 2) (c 3))))
type-error)
(signals-error
(let ((x 1))(ccase x (a 1) (b 2) (c 3)))
type-error)
t)
;;; It is legal to use T or OTHERWISE as key designators
;;; in CCASE forms. They have no special meaning here.
(deftest ccase.4
(classify-error
(let ((x 1))
(ccase x (t nil))))
type-error)
(signals-error
(let ((x 1)) (ccase x (t nil)))
type-error)
t)
(deftest ccase.5
(classify-error
(let ((x 1))
(ccase x (otherwise nil))))
type-error)
(signals-error
(let ((x 1)) (ccase x (otherwise nil)))
type-error)
t)
(deftest ccase.6
(let ((x 'b))
......@@ -55,10 +54,10 @@
a)
(deftest ccase.9
(classify-error
(let (x)
(ccase x (nil 'a))))
type-error)
(signals-error
(let (x) (ccase x (nil 'a)))
type-error)
t)
(deftest ccase.10
(let (x)
......@@ -71,10 +70,10 @@
1 2 3)
(deftest ccase.12
(classify-error
(let ((x t))
(ccase x (a 10))))
type-error)
(signals-error
(let ((x t)) (ccase x (a 10)))
type-error)
t)
(deftest ccase.13
(let ((x t))
......@@ -87,28 +86,28 @@
1)
(deftest ccase.15
(classify-error
(let ((x 'otherwise))
(ccase x ((t) 10))))
type-error)
(signals-error
(let ((x 'otherwise)) (ccase x ((t) 10)))
type-error)
t)
(deftest ccase.16
(classify-error
(let ((x t))
(ccase x ((otherwise) 10))))
type-error)
(signals-error
(let ((x t)) (ccase x ((otherwise) 10)))
type-error)
t)
(deftest ccase.17
(classify-error
(let ((x 'a))
(ccase x (b 0) (c 1) (otherwise 2))))
type-error)
(signals-error
(let ((x 'a)) (ccase x (b 0) (c 1) (otherwise 2)))
type-error)
t)
(deftest ccase.19
(classify-error
(let ((x 'a))
(ccase x (b 0) (c 1) ((t) 2))))
type-error)
(signals-error
(let ((x 'a)) (ccase x (b 0) (c 1) ((t) 2)))
type-error)
t)
(deftest ccase.20
(let ((x #\a))
......@@ -195,19 +194,20 @@
;;; (deftest ccase.error.1
;;; (classify-error (ccase))
;;; program-error)
;;; (signals-error (ccase) program-error)
;;; t)
(deftest ccase.error.1
(classify-error (funcall (macro-function 'ccase)))
program-error)
(signals-error (funcall (macro-function 'ccase))
program-error)
t)
(deftest ccase.error.2
(classify-error (funcall (macro-function 'ccase)
'(ccase t)))
program-error)
(signals-error (funcall (macro-function 'ccase) '(ccase t))
program-error)
t)
(deftest ccase.error.3
(classify-error (funcall (macro-function 'ccase)
'(ccase t) nil nil))
program-error)
\ No newline at end of file
(signals-error (funcall (macro-function 'ccase) '(ccase t) nil nil)
program-error)
t)
......@@ -9,12 +9,12 @@
(compile-and-load "ceiling-aux.lsp")
(deftest ceiling.error.1
(classify-error (ceiling))
program-error)
(signals-error (ceiling) program-error)
t)
(deftest ceiling.error.2
(classify-error (ceiling 1.0 1 nil))
program-error)
(signals-error (ceiling 1.0 1 nil) program-error)
t)
;;;
......
......@@ -43,9 +43,10 @@
(deftest cell-error-name.error.1
(classify-error (cell-error-name))
program-error)
(signals-error (cell-error-name) program-error)
t)
(deftest cell-error-name.error.2
(classify-error (cell-error-name (make-condition 'unbound-variable :name 'foo) nil))
program-error)
(signals-error (cell-error-name (make-condition 'unbound-variable :name 'foo) nil)
program-error)
t)
......@@ -48,9 +48,10 @@
(deftest cerror.error.1
(classify-error (cerror))
program-error)
(signals-error (cerror) program-error)
t)
(deftest cerror.error.2
(classify-error (cerror "foo"))
program-error)
(signals-error (cerror "foo") program-error)
t)
......@@ -592,27 +592,29 @@
;;; Error tests
(deftest change-class.error.1
(classify-error (change-class))
program-error)
(signals-error (change-class) program-error)
t)
(deftest change-class.error.2
(classify-error
(change-class (make-instance 'change-class-class-01a)))
program-error)
(signals-error (change-class (make-instance 'change-class-class-01a))
program-error)
t)
(deftest change-class.error.3
(classify-error
(signals-error
(let ((obj (make-instance 'change-class-class-01a))
(new-class (find-class 'change-class-class-01b)))
(change-class obj new-class :c2)))
program-error)
(change-class obj new-class :c2))
program-error)
t)
(deftest change-class.error.4
(classify-error
(signals-error
(let ((obj (make-instance 'change-class-class-01a))
(new-class (find-class 'change-class-class-01b)))
(change-class obj new-class '(nonsense) 'a)))
program-error)
(change-class obj new-class '(nonsense) 'a))
program-error)
t)
;;; According to the page for BUILT-IN-CLASS, using CHANGE-CLASS
;;; to change the class to/from a builtin class should raise a
......
......@@ -11,11 +11,8 @@
(loop for f in '(char= char/= char< char> char<= char>=
char-lessp char-greaterp char-equal
char-not-lessp char-not-greaterp char-not-equal)
collect (eval `(classify-error (funcall ',f))))
(program-error program-error program-error program-error
program-error program-error program-error program-error
program-error program-error program-error program-error
))
collect (eval `(signals-error (funcall ',f) program-error)))
(t t t t t t t t t t t t))
(deftest char=.1
(is-ordered-by +code-chars+ #'(lambda (c1 c2) (not (char= c1 c2))))
......
......@@ -71,12 +71,12 @@
#\a 1)
(deftest character.error.1
(classify-error (character))
program-error)
(signals-error (character) program-error)
t)
(deftest character.error.2
(classify-error (character #\a #\a))
program-error)
(signals-error (character #\a #\a) program-error)
t)
;;;
......@@ -100,12 +100,12 @@
nil 1)
(deftest characterp.error.1
(classify-error (characterp))
program-error)
(signals-error (characterp) program-error)
t)
(deftest characterp.error.2
(classify-error (characterp #\a #\b))
program-error)
(signals-error (characterp #\a #\b) program-error)
t)
(deftest alpha-char-p.1
......@@ -133,12 +133,12 @@
nil 1)
(deftest alpha-char-p.error.1
(classify-error (alpha-char-p))
program-error)
(signals-error (alpha-char-p) program-error)
t)
(deftest alpha-char-p.error.2
(classify-error (alpha-char-p #\a #\b))
program-error)
(signals-error (alpha-char-p #\a #\b) program-error)
t)
;;;
......@@ -173,12 +173,12 @@
nil 1)
(deftest alphanumericp.error.1
(classify-error (alphanumericp))
program-error)
(signals-error (alphanumericp) program-error)
t)
(deftest alphanumericp.error.2
(classify-error (alphanumericp #\a #\b))
program-error)
(signals-error (alphanumericp #\a #\b) program-error)
t)
;;;
......@@ -208,12 +208,12 @@
#\1 2 2)
(deftest digit-char.error.1
(classify-error (digit-char))
program-error)
(signals-error (digit-char) program-error)
t)
(deftest digit-char.error.2
(classify-error (digit-char 0 10 'foo))
program-error)
(signals-error (digit-char 0 10 'foo) program-error)
t)
;;;
......@@ -262,12 +262,12 @@
0 2 1 2)
(deftest digit-char-p.error.1
(classify-error (digit-char-p))
program-error)
(signals-error (digit-char-p) program-error)
t)
(deftest digit-char-p.error.2
(classify-error (digit-char-p #\1 10 'foo))
program-error)
(signals-error (digit-char-p #\1 10 'foo) program-error)
t)
;;;
......@@ -297,12 +297,12 @@
nil 1)
(deftest graphic-char-p.error.1
(classify-error (graphic-char-p))
program-error)
(signals-error (graphic-char-p) program-error)
t)
(deftest graphic-char-p.error.2
(classify-error (graphic-char-p #\a #\a))
program-error)
(signals-error (graphic-char-p #\a #\a) program-error)
t)
;;;
......@@ -330,12 +330,12 @@
nil 1)
(deftest standard-char-p.error.1
(classify-error (standard-char-p))
program-error)
(signals-error (standard-char-p) program-error)
t)
(deftest standard-char-p.error.2
(classify-error (standard-char-p #\a #\a))
program-error)
(signals-error (standard-char-p #\a #\a) program-error)
t)
;;;
......@@ -363,12 +363,12 @@
#\A 1)
(deftest char-upcase.error.1
(classify-error (char-upcase))
program-error)
(signals-error (char-upcase) program-error)
t)
(deftest char-upcase.error.2
(classify-error (char-upcase #\a #\a))
program-error)
(signals-error (char-upcase #\a #\a) program-error)
t)
;;;
......@@ -396,12 +396,12 @@
#\a 1)
(deftest char-downcase.error.1
(classify-error (char-downcase))
program-error)
(signals-error (char-downcase) program-error)
t)
(deftest char-downcase.error.2
(classify-error (char-downcase #\A #\A))
program-error)
(signals-error (char-downcase #\A #\A) program-error)
t)
;;;
......@@ -429,12 +429,12 @@
nil 1)
(deftest upper-case-p.error.1
(classify-error (upper-case-p))
program-error)
(signals-error (upper-case-p) program-error)
t)
(deftest upper-case-p.error.2
(classify-error (upper-case-p #\a #\A))
program-error)
(signals-error (upper-case-p #\a #\A) program-error)
t)
;;;
......@@ -458,12 +458,12 @@
nil 1)
(deftest lower-case-p.error.1
(classify-error (lower-case-p))
program-error)
(signals-error (lower-case-p) program-error)
t)
(deftest lower-case-p.error.2
(classify-error (lower-case-p #\a #\a))
program-error)
(signals-error (lower-case-p #\a #\a) program-error)
t)
;;;
......@@ -487,12 +487,12 @@
nil 1)
(deftest both-case-p.error.1
(classify-error (both-case-p))
program-error)
(signals-error (both-case-p) program-error)
t)
(deftest both-case-p.error.2
(classify-error (both-case-p #\a #\a))
program-error)
(signals-error (both-case-p #\a #\a) program-error)
t)
;;;
......@@ -512,12 +512,12 @@
nil 1)
(deftest char-code.error.1
(classify-error (char-code))
program-error)
(signals-error (char-code) program-error)
t)
(deftest char-code.error.2
(classify-error (char-code #\a #\a))
program-error)
(signals-error (char-code #\a #\a) program-error)
t)
;;;
......@@ -534,12 +534,12 @@
#\a 1)
(deftest code-char.error.1
(classify-error (code-char))
program-error)
(signals-error (code-char) program-error)
t)
(deftest code-char.error.2
(classify-error (code-char 1 1))
program-error)
(signals-error (code-char 1 1) program-error)
t)
;;;
......@@ -560,12 +560,12 @@
#\a 1)
(deftest char-int.error.1
(classify-error (char-int))
program-error)
(signals-error (char-int) program-error)
t)
(deftest char-int.error.2
(classify-error (char-int #\a #\a))
program-error)
(signals-error (char-int #\a #\a) program-error)
t)
;;;
......@@ -611,12 +611,12 @@
"Space" 1)
(deftest char-name.error.1
(classify-error (char-name))
program-error)
(signals-error (char-name) program-error)
t)
(deftest char-name.error.2
(classify-error (char-name #\a #\a))
program-error)
(signals-error (char-name #\a #\a) program-error)
t)
;;;
......@@ -643,9 +643,9 @@
#\Space 1)
(deftest name-char.error.1
(classify-error (name-char))
program-error)
(signals-error (name-char) program-error)
t)
(deftest name-char.error.2
(classify-error (name-char "space" "space"))
program-error)
(signals-error (name-char "space" "space") program-error)
t)
......@@ -11,10 +11,11 @@
nil a)
(deftest check-type.2
(classify-error
(signals-error
(let ((x 'a))
(check-type x integer)))
type-error)
(check-type x integer))
type-error)
t)
(deftest check-type.3
(let ((x 'a))
......
......@@ -8,12 +8,12 @@
(compile-and-load "numbers-aux.lsp")
(deftest cis.error.1
(classify-error (cis))
program-error)
(signals-error (cis) program-error)
t)
(deftest cis.error.2
(classify-error (cis 0 nil))
program-error)
(signals-error (cis 0 nil) program-error)
t)
(deftest cis.1
(eqlt (cis 0) #c(1.0 0.0))
......
......@@ -1138,34 +1138,33 @@
;;; Various error cases for symbol-related functions
(deftest symbol-function.error.1
(classify-error (symbol-function))
program-error)
(signals-error (symbol-function) program-error)
t)
(deftest symbol-function.error.2
(classify-error (symbol-function 'cons nil))
program-error)
(signals-error (symbol-function 'cons nil) program-error)
t)
(deftest symbol-package.error.1
(classify-error (symbol-package))
program-error)
(signals-error (symbol-package) program-error)
t)
(deftest symbol-package.error.2
(classify-error (symbol-package 'cons nil))
program-error)
(signals-error (symbol-package 'cons nil) program-error)
t)
(deftest symbol-plist.error.1
(classify-error (symbol-plist))
program-error)
(signals-error (symbol-plist) program-error)
t)
(deftest symbol-plist.error.2
(classify-error (symbol-plist 'cons nil))
program-error)
(signals-error (symbol-plist 'cons nil) program-error)
t)
(deftest symbol-value.error.1
(classify-error (symbol-value))
program-error)
(signals-error (symbol-value) program-error)
t)
(deftest symbol-value.error.2
(classify-error (symbol-value '*package* nil))
program-error)
(signals-error (symbol-value '*package* nil) program-error)
t)
......@@ -27,9 +27,10 @@
t)
(deftest class-name.error.1
(classify-error (class-name))
program-error)
(signals-error (class-name) program-error)
t)
(deftest class-name.error.2
(classify-error (class-name (find-class 'symbol) nil))
program-error)
(signals-error (class-name (find-class 'symbol) nil)
program-error)
t)
......@@ -8,9 +8,9 @@
;;; Most tests of CLASS-OF are in other files
(deftest class-of.error.1
(classify-error (class-of))
program-error)
(signals-error (class-of) program-error)
t)
(deftest class-of.error.2
(classify-error (class-of nil nil))
program-error)
(signals-error (class-of nil nil) program-error)
t)
......@@ -58,10 +58,12 @@
;;;
(deftest clrhash.error.1
(classify-error (clrhash))
program-error)
(signals-error (clrhash) program-error)
t)
(deftest clrhash.error.2
(classify-error (clrhash (make-hash-table) nil))
program-error)
(signals-error (clrhash (make-hash-table) nil)
program-error)
t)
......@@ -141,20 +141,20 @@
;;; Error tests
;;; (deftest coerce.error.1
;;; (classify-error (coerce -1 '(integer 0 100)))
;;; type-error)
;;; (signals-error (coerce -1 '(integer 0 100)) type-error)
;;; t)
(deftest coerce.error.2
(classify-error (coerce '(a b c) '(vector * 2)))
type-error)
(signals-error (coerce '(a b c) '(vector * 2)) type-error)
t)
(deftest coerce.error.3
(classify-error (coerce '(a b c) '(vector * 4)))
type-error)
(signals-error (coerce '(a b c) '(vector * 4)) type-error)
t)
(deftest coerce.error.4
(classify-error (coerce nil 'cons))
type-error)
(signals-error (coerce nil 'cons) type-error)
t)
(deftest coerce.error.5
(handler-case
......@@ -163,17 +163,18 @@
:caught)
(deftest coerce.error.6
(classify-error (coerce))
program-error)
(signals-error (coerce) program-error)
t)
(deftest coerce.error.7
(classify-error (coerce t))
program-error)
(signals-error (coerce t) program-error)
t)
(deftest coerce.error.8
(classify-error (coerce 'x t 'foo))
program-error)
(signals-error (coerce 'x t 'foo) program-error)
t)
(deftest coerce.error.9
(classify-error (locally (coerce nil 'cons) t))
type-error)
(signals-error (locally (coerce nil 'cons) t) type-error)
t)