source: trunk/source/tests/ansi-tests/ignore-errors.lsp @ 8991

Last change on this file since 8991 was 8991, checked in by gz, 11 years ago

Check in the gcl ansi test suite (original, in preparation for making local changes)

File size: 723 bytes
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Sun Mar  2 20:38:25 2003
4;;;; Contains: Tests of IGNORE-ERRORS
5
6(in-package :cl-test)
7
8(deftest ignore-errors.1
9  (ignore-errors)
10  nil)
11
12(deftest ignore-errors.2
13  (ignore-errors 'a)
14  a)
15
16(deftest ignore-errors.3
17  (ignore-errors (values 1 2 3 4 5 6 7 8))
18  1 2 3 4 5 6 7 8)
19
20(deftest ignore-errors.4
21  (multiple-value-bind (val cond)
22      (ignore-errors (error "foo"))
23    (and (null val)
24         (typep cond 'simple-error)
25         t))
26  t)
27
28(deftest ignore-errors.5
29  (handler-case
30   (ignore-errors (signal "foo"))
31   (condition () 'good))
32  good)
33
34(deftest ignore-errors.6
35  (handler-case
36   (ignore-errors (signal "foo"))
37   (simple-condition () 'good))
38  good)
Note: See TracBrowser for help on using the repository browser.