source: trunk/source/tests/ansi-tests/proclaim.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.4 KB
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Sat May 21 07:33:53 2005
4;;;; Contains: Tests of PROCLAIM
5
6(in-package :cl-test)
7
8(deftest proclaim.1
9  (let ((sym (gensym)))
10    (proclaim `(special ,sym))
11    (eval `(flet ((%f () ,sym))
12             (let ((,sym :good)) (%f)))))
13  :good)
14
15(deftest proclaim.2
16  (let ((sym (gensym)))
17    (proclaim `(declaration ,sym))
18    (proclaim `(,sym))
19    nil)
20  nil)
21
22(deftest proclaim.3
23  (let ((i 0))
24    (proclaim (progn (incf i) '(optimize)))
25    i)
26  1)
27
28;;; Error cases
29
30(deftest proclaim.error.1
31  (signals-error (proclaim) program-error)
32  t)
33
34(deftest proclaim.error.2
35  (signals-error (proclaim '(optimize) nil) program-error)
36  t)
37
38(deftest proclaim.error.3
39  (signals-error (proclaim `(optimize . foo)) error)
40  t)
41
42(deftest proclaim.error.4
43  (signals-error (proclaim `(inline . foo)) error)
44  t)
45
46(deftest proclaim.error.5
47  (signals-error (proclaim `(notinline . foo)) error)
48  t)
49
50(deftest proclaim.error.6
51  (signals-error (proclaim `(type . foo)) error)
52  t)
53
54(deftest proclaim.error.7
55  (signals-error (proclaim `(ftype . foo)) type-error)
56  t)
57
58(deftest proclaim.error.8
59  (signals-error (proclaim '(type integer . foo)) error)
60  t)
61
62(deftest proclaim.error.9
63  (signals-error (proclaim '(integer . foo)) error)
64  t)
65
66(deftest proclaim.error.10
67  (signals-error (proclaim '(declaration . foo)) error)
68  t)
69
70(deftest proclaim.error.11
71  (signals-error (proclaim '(ftype (function (t) t) . foo)) error)
72  t)
Note: See TracBrowser for help on using the repository browser.