source: trunk/source/tests/ansi-tests/cell-error-name.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: 1.2 KB
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Mon Jan 27 22:36:48 2003
4;;;; Contains: Tests of CELL-ERROR-NAME
5
6(in-package :cl-test)
7
8(deftest cell-error-name.1
9  (handler-case
10   (eval 'my-unbound-variable)
11   (cell-error (c) (cell-error-name c)))
12  my-unbound-variable)
13
14(deftest cell-error-name.2
15  (handler-case
16   (eval '(my-undefined-function))
17   ;; (warning (c) (muffle-warning c))
18   (cell-error (c) (cell-error-name c)))
19  my-undefined-function)
20
21(deftest cell-error-name.3
22  (cell-error-name (make-condition 'unbound-variable :name 'x))
23  x)
24 
25(deftest cell-error-name.4
26  (cell-error-name (make-condition 'undefined-function :name 'f))
27  f)
28 
29(deftest cell-error-name.5
30  (cell-error-name (make-condition 'unbound-slot :name 's))
31  s)
32
33(deftest cell-error-name.6
34  (let ((i 0))
35    (values
36     (cell-error-name (progn (incf i) (make-condition
37                                       'unbound-slot :name 's)))
38     i))
39  s 1)
40
41 
42;;; Need test raising condition unbound-slot
43
44
45(deftest cell-error-name.error.1
46  (signals-error (cell-error-name) program-error)
47  t)
48
49(deftest cell-error-name.error.2
50  (signals-error (cell-error-name (make-condition 'unbound-variable :name 'foo) nil)
51                 program-error)
52  t)
Note: See TracBrowser for help on using the repository browser.