source: trunk/source/tests/ansi-tests/optimize.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.1 KB
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Sat May 21 09:31:34 2005
4;;;; Contains: Tests of the OPTIMIZE declaration
5
6(in-package :cl-test)
7
8(deftest optimize.1
9  (locally (declare (optimize)) nil)
10  nil)
11
12(deftest optimize.2
13  (locally (declare (optimize speed)) nil)
14  nil)
15
16(deftest optimize.3
17  (locally (declare (optimize space)) nil)
18  nil)
19
20(deftest optimize.4
21  (locally (declare (optimize safety)) nil)
22  nil)
23
24(deftest optimize.5
25  (locally (declare (optimize debug)) nil)
26  nil)
27
28(deftest optimize.6
29  (locally (declare (optimize compilation-speed)) nil)
30  nil)
31
32(deftest optimize.7
33  (loop for d in '(speed space safety debug compilation-speed)
34        nconc (loop for n from 0 to 3
35                    for form = `(locally (declare (optimize (,d ,n))) t)
36                    for val = (eval form)
37                    unless (eql val t)
38                    collect (list d n val)))
39  nil)
40
41(deftest optimize.8
42  (loop for d in '(speed space safety debug compilation-speed)
43        nconc (loop for n from 0 to 3
44                    for form = `(lambda ()
45                                  (declare (optimize (,d ,n)))
46                                  t)
47                    for val = (funcall (compile nil form))
48                    unless (eql val t)
49                    collect (list d n val)))
50  nil)
51
52
53
54                 
Note: See TracBrowser for help on using the repository browser.