source: trunk/source/tests/ansi-tests/prog1.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: 798 bytes
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Sat Oct 19 09:37:14 2002
4;;;; Contains: Tests for PROG1
5
6(in-package :cl-test)
7
8(deftest prog1.1
9  (prog1 'a)
10  a)
11
12(deftest prog1.2
13  (prog1 'a 'b)
14  a)
15
16(deftest prog1.3
17  (prog1 (values 'a 'b) 'c)
18  a)
19
20(deftest prog1.4
21  (prog1 (values) 'c)
22  nil)
23
24(deftest prog1.5
25  (let ((x 0))
26    (values (prog1 x (incf x)) x))
27  0 1)
28
29;;; Test that prog1 doesn't have a tagbody
30
31(deftest prog1.6
32  (block nil
33    (tagbody
34     (return (prog1 'bad (go 10) 10))
35     10
36     (return 'good)))
37  good)
38
39;;; Test that explicit calls to macroexpand in subforms
40;;; are done in the correct environment
41
42(deftest prog1.7
43  (macrolet
44   ((%m (z) z))
45   (prog1 (expand-in-current-env (%m 'good))))
46  good)
47
48(def-macro-test prog1.error.1 (prog1 nil))
Note: See TracBrowser for help on using the repository browser.