source: trunk/source/tests/ansi-tests/set.lsp @ 8991

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

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

File size: 1.3 KB
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Sat Jun 21 22:35:48 2003
4;;;; Contains: Tests of SET
5
6(in-package :cl-test)
7
8(deftest set.1
9  (let ((*var-used-in-set-tests* 'a)
10        (var '*var-used-in-set-tests*))
11    (declare (special *var-used-in-set-tests*))
12    (values
13     *var-used-in-set-tests*
14     (set var 'b)
15     *var-used-in-set-tests*))
16  a b b)
17
18(deftest set.2
19  (let ((*var-used-in-set-tests* 'a)
20        (var '*var-used-in-set-tests*))
21    (declare (special *var-used-in-set-tests*))
22    (values
23     (let ((*var-used-in-set-tests* 'c))
24       (list (set var 'b) *var-used-in-set-tests* (symbol-value var)))
25     *var-used-in-set-tests*))
26  (b c b)
27  b)
28
29(deftest set.error.1
30  (signals-error (set) program-error)
31  t)
32
33(deftest set.error.2
34  (signals-error
35   (let ((*var-used-in-set-tests* 'a))
36     (declare (special *var-used-in-set-tests*))
37     (set '*var-used-in-set-tests*))
38   program-error)
39  t)
40
41(deftest set.error.3
42  (signals-error
43   (let ((*var-used-in-set-tests* 'a))
44     (declare (special *var-used-in-set-tests*))
45     (set '*var-used-in-set-tests* nil nil))
46   program-error)
47  t)
48
49(deftest set.error.4
50  (signals-error
51   (let ((*var-used-in-set-tests* 'a) (*y* 'b))
52     (declare (special *var-used-in-set-tests*))
53     (set '*var-used-in-set-tests* nil '*y* nil))
54   program-error)
55  t)
Note: See TracBrowser for help on using the repository browser.