Commit b0ecdaa7 authored by pfdietz's avatar pfdietz
Browse files

Changed classify-error forms to signals-error forms.

parent b2be6596
...@@ -44,5 +44,5 @@ ...@@ -44,5 +44,5 @@
;;; errors ;;; errors
(deftest translate-logical-pathname.error.1 (deftest translate-logical-pathname.error.1
(classify-error (translate-logical-pathname)) (signals-error (translate-logical-pathname) program-error)
program-error) t)
...@@ -114,25 +114,25 @@ ...@@ -114,25 +114,25 @@
;;; Error tests ;;; Error tests
(deftest tree-equal.error.1 (deftest tree-equal.error.1
(classify-error (tree-equal)) (signals-error (tree-equal) program-error)
program-error) t)
(deftest tree-equal.error.2 (deftest tree-equal.error.2
(classify-error (tree-equal '(a b))) (signals-error (tree-equal '(a b)) program-error)
program-error) t)
(deftest tree-equal.error.3 (deftest tree-equal.error.3
(classify-error (tree-equal '(a b) '(a b) (gensym) t)) (signals-error (tree-equal '(a b) '(a b) (gensym) t) program-error)
program-error) t)
(deftest tree-equal.error.4 (deftest tree-equal.error.4
(classify-error (tree-equal '(a b) '(a b) (gensym) t :allow-other-keys nil)) (signals-error (tree-equal '(a b) '(a b) (gensym) t :allow-other-keys nil) program-error)
program-error) t)
(deftest tree-equal.error.5 (deftest tree-equal.error.5
(classify-error (tree-equal '(a b) '(a b) :test #'identity)) (signals-error (tree-equal '(a b) '(a b) :test #'identity) program-error)
program-error) t)
(deftest tree-equal.error.6 (deftest tree-equal.error.6
(classify-error (tree-equal '(a b) '(a b) :test #'(lambda (x y z) (eq x y)))) (signals-error (tree-equal '(a b) '(a b) :test #'(lambda (x y z) (eq x y))) program-error)
program-error) t)
...@@ -72,31 +72,31 @@ ...@@ -72,31 +72,31 @@
;;; ;;;
(deftest truename.error.1 (deftest truename.error.1
(classify-error (truename)) (signals-error (truename) program-error)
program-error) t)
(deftest truename.error.2 (deftest truename.error.2
(classify-error (truename "truename.lsp" nil)) (signals-error (truename "truename.lsp" nil) program-error)
program-error) t)
(deftest truename.error.3 (deftest truename.error.3
(classify-error (truename "nonexistent")) (signals-error (truename "nonexistent") file-error)
file-error) t)
(deftest truename.error.4 (deftest truename.error.4
(classify-error (truename #p"nonexistent")) (signals-error (truename #p"nonexistent") file-error)
file-error) t)
(deftest truename.error.5 (deftest truename.error.5
(classify-error (truename (logical-pathname "CLTESTROOT:nonexistent"))) (signals-error (truename (logical-pathname "CLTESTROOT:nonexistent")) file-error)
file-error) t)
(deftest truename.error.6 (deftest truename.error.6
(classify-error (signals-error
(let ((pn (make-pathname :name :wild (let ((pn (make-pathname :name :wild
:defaults *default-pathname-defaults*))) :defaults *default-pathname-defaults*)))
(truename pn))) (truename pn)) file-error)
file-error) t)
......
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
(compile-and-load "truncate-aux.lsp") (compile-and-load "truncate-aux.lsp")
(deftest truncate.error.1 (deftest truncate.error.1
(classify-error (truncate)) (signals-error (truncate) program-error)
program-error) t)
(deftest truncate.error.2 (deftest truncate.error.2
(classify-error (truncate 1.0 1 nil)) (signals-error (truncate 1.0 1 nil) program-error)
program-error) t)
;;; ;;;
......
...@@ -101,9 +101,9 @@ ...@@ -101,9 +101,9 @@
;;; Error tests ;;; Error tests
(deftest type-of.error.1 (deftest type-of.error.1
(classify-error (type-of)) (signals-error (type-of) program-error)
program-error) t)
(deftest type-of.error.2 (deftest type-of.error.2
(classify-error (type-of nil nil)) (signals-error (type-of nil nil) program-error)
program-error) t)
...@@ -94,19 +94,19 @@ ...@@ -94,19 +94,19 @@
good) good)
(deftest typecase.error.1 (deftest typecase.error.1
(classify-error (funcall (macro-function 'typecase))) (signals-error (funcall (macro-function 'typecase)) program-error)
program-error) t)
(deftest typecase.error.2 (deftest typecase.error.2
(classify-error (funcall (macro-function 'typecase) (signals-error (funcall (macro-function 'typecase)
'(typecase t))) '(typecase t)) program-error)
program-error) t)
(deftest typecase.error.3 (deftest typecase.error.3
(classify-error (funcall (macro-function 'typecase) (signals-error (funcall (macro-function 'typecase)
'(typecase t) '(typecase t)
nil nil)) nil nil) program-error)
program-error) t)
...@@ -283,41 +283,42 @@ ...@@ -283,41 +283,42 @@
;;; Error checking of type-related functions ;;; Error checking of type-related functions
(deftest typep.error.1 (deftest typep.error.1
(classify-error (typep)) (signals-error (typep) program-error)
program-error) t)
(deftest typep.error.2 (deftest typep.error.2
(classify-error (typep nil)) (signals-error (typep nil) program-error)
program-error) t)
(deftest typep.error.3 (deftest typep.error.3
(classify-error (typep nil t nil nil)) (signals-error (typep nil t nil nil) program-error)
program-error) t)
(deftest type-error-datum.error.1 (deftest type-error-datum.error.1
(classify-error (type-error-datum)) (signals-error (type-error-datum) program-error)
program-error) t)
(deftest type-error-datum.error.2 (deftest type-error-datum.error.2
(classify-error (signals-error
(let ((c (make-condition 'type-error :datum nil (let ((c (make-condition 'type-error :datum nil
:expected-type t))) :expected-type t)))
(type-error-datum c nil))) (type-error-datum c nil))
program-error) program-error)
t)
(deftest type-error-expected-type.error.1 (deftest type-error-expected-type.error.1
(classify-error (type-error-expected-type)) (signals-error (type-error-expected-type)
program-error) program-error)
t)
(deftest type-error-expected-type.error.2 (deftest type-error-expected-type.error.2
(classify-error (signals-error
(let ((c (make-condition 'type-error :datum nil (let ((c (make-condition 'type-error :datum nil
:expected-type t))) :expected-type t)))
(type-error-expected-type c nil))) (type-error-expected-type c nil))
program-error) program-error)
t)
;;; Tests of env arguments to typep ;;; Tests of env arguments to typep
......
...@@ -364,49 +364,49 @@ ...@@ -364,49 +364,49 @@
;;; Error tests ;;; Error tests
(deftest union.error.1 (deftest union.error.1
(classify-error (union)) (signals-error (union) program-error)
program-error) t)
(deftest union.error.2 (deftest union.error.2
(classify-error (union nil)) (signals-error (union nil) program-error)
program-error) t)
(deftest union.error.3 (deftest union.error.3
(classify-error (union nil nil :bad t)) (signals-error (union nil nil :bad t) program-error)
program-error) t)
(deftest union.error.4 (deftest union.error.4
(classify-error (union nil nil :key)) (signals-error (union nil nil :key) program-error)
program-error) t)
(deftest union.error.5 (deftest union.error.5
(classify-error (union nil nil 1 2)) (signals-error (union nil nil 1 2) program-error)
program-error) t)
(deftest union.error.6 (deftest union.error.6
(classify-error (union nil nil :bad t :allow-other-keys nil)) (signals-error (union nil nil :bad t :allow-other-keys nil) program-error)
program-error) t)
(deftest union.error.7 (deftest union.error.7
(classify-error (union (list 1 2) (list 3 4) :test #'identity)) (signals-error (union (list 1 2) (list 3 4) :test #'identity) program-error)
program-error) t)
(deftest union.error.8 (deftest union.error.8
(classify-error (union (list 1 2) (list 3 4) :test-not #'identity)) (signals-error (union (list 1 2) (list 3 4) :test-not #'identity) program-error)
program-error) t)
(deftest union.error.9 (deftest union.error.9
(classify-error (union (list 1 2) (list 3 4) :key #'cons)) (signals-error (union (list 1 2) (list 3 4) :key #'cons) program-error)
program-error) t)
(deftest union.error.10 (deftest union.error.10
(classify-error (union (list 1 2) (list 3 4) :key #'car)) (signals-error (union (list 1 2) (list 3 4) :key #'car) type-error)
type-error) t)
(deftest union.error.11 (deftest union.error.11
(classify-error (union (list 1 2 3) (list* 4 5 6))) (signals-error (union (list 1 2 3) (list* 4 5 6)) type-error)
type-error) t)
(deftest union.error.12 (deftest union.error.12
(classify-error (union (list* 1 2 3) (list 4 5 6))) (signals-error (union (list* 1 2 3) (list 4 5 6)) type-error)
type-error) t)
...@@ -56,20 +56,18 @@ ...@@ -56,20 +56,18 @@
(return-from done 'good))) (return-from done 'good)))
good) good)
;;; (deftest unless.error.1
;;; (classify-error (unless))
;;; program-error)
(deftest unless.error.1 (deftest unless.error.1
(classify-error (funcall (macro-function 'unless))) (signals-error (funcall (macro-function 'unless)) program-error)
program-error) t)
(deftest unless.error.2 (deftest unless.error.2
(classify-error (funcall (macro-function 'unless) (signals-error (funcall (macro-function 'unless)
'(unless t))) '(unless t))
program-error) program-error)
t)
(deftest unless.error.3 (deftest unless.error.3
(classify-error (funcall (macro-function 'unless) (signals-error (funcall (macro-function 'unless)
'(unless t) nil nil)) '(unless t) nil nil)
program-error) program-error)
\ No newline at end of file t)
\ No newline at end of file
...@@ -118,9 +118,9 @@ ...@@ -118,9 +118,9 @@
;;; Error tests ;;; Error tests
(deftest upgraded-array-element-type.error.1 (deftest upgraded-array-element-type.error.1
(classify-error (upgraded-array-element-type)) (signals-error (upgraded-array-element-type) program-error)
program-error) t)
(deftest upgraded-array-element-type.error.2 (deftest upgraded-array-element-type.error.2
(classify-error (upgraded-array-element-type 'bit nil nil)) (signals-error (upgraded-array-element-type 'bit nil nil) program-error)
program-error) t)
...@@ -6,20 +6,20 @@ ...@@ -6,20 +6,20 @@
(in-package :cl-test) (in-package :cl-test)
(deftest values-list.error.1 (deftest values-list.error.1
(classify-error (values-list)) (signals-error (values-list) program-error)
program-error) t)
(deftest values-list.error.2 (deftest values-list.error.2
(classify-error (values-list nil nil)) (signals-error (values-list nil nil) program-error)
program-error) t)
(deftest values-list.error.3 (deftest values-list.error.3
(classify-error (values-list 'a)) (signals-error (values-list 'a) type-error)
type-error) t)
(deftest values-list.error.4 (deftest values-list.error.4
(classify-error (values-list '(a b c . d))) (signals-error (values-list '(a b c . d)) type-error)
type-error) t)
(deftest values-list.1 (deftest values-list.1
(values-list nil)) (values-list nil))
......
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
;;; Error cases ;;; Error cases
(deftest vector-pop.error.1 (deftest vector-pop.error.1
(classify-error (vector-pop (vector 1 2 3))) (signals-error (vector-pop (vector 1 2 3)) type-error)
type-error) t)
(deftest vector-pop.error.2 (deftest vector-pop.error.2
(let ((v (make-array '(5) :initial-element 'x (let ((v (make-array '(5) :initial-element 'x
...@@ -30,15 +30,16 @@ ...@@ -30,15 +30,16 @@
error) error)
(deftest vector-pop.error.3 (deftest vector-pop.error.3
(classify-error (vector-pop)) (signals-error (vector-pop) program-error)
program-error) t)
(deftest vector-pop.error.4 (deftest vector-pop.error.4
(classify-error (let ((v (make-array '(5) :fill-pointer t (signals-error (let ((v (make-array '(5) :fill-pointer t
:initial-element 'x))) :initial-element 'x)))
(vector-pop v nil))) (vector-pop v nil))
program-error) program-error)
t)
(deftest vector-pop.error.5 (deftest vector-pop.error.5
(classify-error (locally (vector-pop (vector 1 2 3)) t)) (signals-error (locally (vector-pop (vector 1 2 3)) t) type-error)
type-error) t)
...@@ -331,16 +331,16 @@ ...@@ -331,16 +331,16 @@
t) t)
(deftest vector-push-extend.error.14 (deftest vector-push-extend.error.14
(classify-error (vector-push-extend)) (signals-error (vector-push-extend) program-error)
program-error) t)
(deftest vector-push-extend.error.15 (deftest vector-push-extend.error.15
(classify-error (vector-push-extend (vector 1 2 3))) (signals-error (vector-push-extend (vector 1 2 3)) program-error)
program-error) t)
(deftest vector-push-extend.error.16 (deftest vector-push-extend.error.16
(classify-error (vector-push-extend (vector 1 2 3) 4 1 nil)) (signals-error (vector-push-extend (vector 1 2 3) 4 1 nil) program-error)
program-error) t)
(deftest vector-push-extend.error.17 (deftest vector-push-extend.error.17
(handler-case (handler-case
......
...@@ -307,13 +307,13 @@ ...@@ -307,13 +307,13 @@
t) t)
(deftest vector-push.error.14 (deftest vector-push.error.14
(classify-error (vector-push)) (signals-error (vector-push) program-error)
program-error) t)
(deftest vector-push.error.15 (deftest vector-push.error.15
(classify-error (vector-push (vector 1 2 3))) (signals-error (vector-push (vector 1 2 3)) program-error)
program-error) t)
(deftest vector-push.error.16 (deftest vector-push.error.16
(classify-error (vector-push (vector 1 2 3) 4 nil)) (signals-error (vector-push (vector 1 2 3) 4 nil) program-error)
program-error) t)
...@@ -68,12 +68,12 @@ ...@@ -68,12 +68,12 @@
;;; Error tests ;;; Error tests
(deftest vectorp.error.1 (deftest vectorp.error.1
(classify-error (vectorp)) (signals-error (vectorp) program-error)
program-error) t)
(deftest vectorp.error.2 (deftest vectorp.error.2
(classify-error (vectorp #() #())) (signals-error (vectorp #() #()) program-error)
program-error) t)
......
...@@ -133,29 +133,29 @@ ...@@ -133,29 +133,29 @@
(nil) t) (nil) t)
(deftest warn.12 (deftest warn.12
(classify-error (warn 'condition)) (signals-error (warn 'condition) type-error)
type-error) t)
(deftest warn.13 (deftest warn.13
(classify-error (warn 'simple-condition)) (signals-error (warn 'simple-condition) type-error)
type-error) t)
(deftest warn.14 (deftest warn.14
(classify-error (warn (make-condition 'simple-warning) :format-control "Foo")) (signals-error (warn (make-condition 'simple-warning) :format-control "Foo") type-error)
type-error) t)
(deftest warn.15 (deftest warn.15
(classify-error (warn)) (signals-error (warn) program-error)
program-error) t)
(deftest warn.16 (deftest warn.16
(classify-error (warn (make-condition 'condition))) (signals-error (warn (make-condition 'condition)) type-error)
type-error) t)
(deftest warn.17 (deftest warn.17
(classify-error (warn (make-condition 'simple-condition))) (signals-error (warn (make-condition 'simple-condition)) type-error)
type-error) t)
(deftest warn.18 (deftest warn.18
(classify-error (warn (make-condition 'simple-error))) (signals-error (warn (make-condition 'simple-error)) type-error)
type-error) t)
...@@ -46,21 +46,20 @@ ...@@ -46,21 +46,20 @@
(return-from done 'good))) (return-from done 'good)))
good) good)
;;; Error tests
;;; (deftest when.error.1
;;; (classify-error (when))
;;; program-error)