Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Karsten Poeck
ansi-test
Commits
68c204ce
Commit
68c204ce
authored
Feb 16, 2003
by
pfdietz
Browse files
Changed apply.6 to apply.order.1. Added more error, cerror tests.
parent
202b1736
Changes
4
Hide whitespace changes
Inline
Side-by-side
ansi-tests/apply.lsp
View file @
68c204ce
...
...
@@ -43,12 +43,15 @@
(apply 'cons '(a b))
(a . b))
(deftest apply.
6
(let ((
x
0) y z)
(deftest apply.
order.1
(let ((
i
0)
x
y z)
(values
(apply (progn (setf y (incf x))
#'identity)
(progn (setf z (incf x))
(apply (progn (setf x (incf i))
#'list)
(progn (setf y (incf i))
'b)
(progn (setf z (incf i))
(list 'a)))
x y z))
a 2 1 2)
i x y z))
(b a) 3 1 2 3)
ansi-tests/cerror.lsp
0 → 100644
View file @
68c204ce
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Sat Feb 15 19:45:27 2003
;;;; Contains: Tests of CERROR
(in-package :cl-test)
(deftest cerror.1
(let ((fmt "Cerror"))
(handler-case (cerror "Keep going." fmt)
(simple-error (c)
(and
(null (simple-condition-format-arguments c))
(eqt (simple-condition-format-control c)
fmt)))))
t)
(deftest cerror.2
(let* ((fmt "Cerror")
(cnd (make-condition 'simple-error :format-control fmt)))
(handler-case (cerror "Continue on." cnd)
(simple-error (c)
(and (eqt c cnd)
(eqt (simple-condition-format-control c)
fmt)))))
t)
(deftest cerror.3
(let ((fmt "Cerror"))
(handler-case (cerror "Continue" 'simple-error :format-control fmt)
(simple-error (c)
(eqt (simple-condition-format-control c)
fmt))))
t)
(deftest cerror.4
(let ((fmt "Cerror: ~A"))
(handler-case (cerror "On on" fmt 10)
(simple-error (c)
(and
(equalt
(simple-condition-format-arguments c)
'(10))
(eqt (simple-condition-format-control c)
fmt)))))
t)
(deftest cerror.5
(let ((fmt (formatter "Cerror")))
(handler-case (cerror "Keep going." fmt)
(simple-error (c)
(and
(null (simple-condition-format-arguments c))
(eqt (simple-condition-format-control c)
fmt)))))
t)
;;; Continuing from a cerror
(deftest cerror.6
(handler-bind ((simple-error #'(lambda (c) (continue c))))
(progn
(cerror "Wooo" 'simple-error)
10))
10)
ansi-tests/error.lsp
View file @
68c204ce
...
...
@@ -9,8 +9,10 @@
(let ((fmt "Error"))
(handler-case (error fmt)
(simple-error (c)
(eqt (simple-condition-format-control c)
fmt))))
(and
(null (simple-condition-format-arguments c))
(eqt (simple-condition-format-control c)
fmt)))))
t)
(deftest error.2
...
...
@@ -31,5 +33,26 @@
fmt))))
t)
(deftest error.4
(let ((fmt "Error: ~A"))
(handler-case (error fmt 10)
(simple-error (c)
(and
(equalt
(simple-condition-format-arguments c)
'(10))
(eqt (simple-condition-format-control c)
fmt)))))
t)
(deftest error.5
(let ((fmt (formatter "Error")))
(handler-case (error fmt)
(simple-error (c)
(and
(null (simple-condition-format-arguments c))
(eqt (simple-condition-format-control c)
fmt)))))
t)
ansi-tests/gclload2.lsp
View file @
68c204ce
...
...
@@ -109,6 +109,7 @@
(load "cell-error-name.lsp")
(load "assert.lsp")
(load "error.lsp")
(load "cerror.lsp")
;;; Tests of conses
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment