Commit b0ecdaa7 authored by pfdietz's avatar pfdietz

Changed classify-error forms to signals-error forms.

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