Commit ad9531b3 authored by Luís Oliveira's avatar Luís Oliveira
Browse files

tests: define and use ERRORP

- TYPEP returns a generalized boolean.  On Lisps like ECL, this detail
  was causing some tests to fail.  ERRORP takes this into account.
parent fc34cc10
......@@ -178,10 +178,16 @@
;;;; Errors
;;; TYPEP is specified to return a generalized boolean and, for
;;; example, ECL exploits this by returning the superclasses of ERROR
;;; in this case.
(defun errorp (x)
(not (null (typep x 'error))))
(deftest required-argument.1
(multiple-value-bind (res err)
(ignore-errors (required-argument))
(typep err 'error))
(errorp err))
;;;; Hash tables
......@@ -1338,7 +1344,7 @@
(list (find-if #'symbol-package syms)
(equal '("_foo_0" "-BAR-1" "q2")
(mapcar #'symbol-name syms))))))
(typep err 'error)))
(errorp err)))
(deftest once-only.1
......@@ -1399,7 +1405,7 @@
(parse-body '("foo" "bar" "quux")
:documentation t))
(typep err 'error))
(errorp err))
;;;; Symbols
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