source: trunk/source/tests/ansi-tests/special.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: 713 bytes
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Sat May 21 12:51:59 2005
4;;;; Contains: Tests of the declaration SPECIAL
5
6(in-package :cl-test)
7
8;;; Many tests for this declaration are in the tests
9;;; for specific binding forms.
10
11(deftest special.1
12  (let ((f 1))
13    (declare (special f))
14    (flet ((f () :good))
15      (flet ((g () (f)))
16        (flet ((f () :bad))
17          (g)))))
18  :good)
19
20(deftest special.2
21  (let ((x 'a))
22    (declare (special x))
23    (let ((x 'b))
24      (values x (locally (declare (special x)) x) x)))
25  b a b)
26
27(deftest special.3
28  (flet ((%f () (declare (special x10)) x10))
29    (let ((x10 'a))
30      (declare (special x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12))
31      (%f)))
32  a)
33
Note: See TracBrowser for help on using the repository browser.