~ubuntu-branches/ubuntu/quantal/gclcvs/quantal

« back to all changes in this revision

Viewing changes to ansi-tests/if.lsp

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2004-06-24 15:13:46 UTC
  • Revision ID: james.westby@ubuntu.com-20040624151346-xh0xaaktyyp7aorc
Tags: 2.7.0-26
C_GC_OFFSET is 2 on m68k-linux

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
;-*- Mode:     Lisp -*-
 
2
;;;; Author:   Paul Dietz
 
3
;;;; Created:  Fri Oct 18 08:21:29 2002
 
4
;;;; Contains: Tests for IF
 
5
 
 
6
(in-package :cl-test)
 
7
 
 
8
(deftest if.1
 
9
  (if t 1 2)
 
10
  1)
 
11
 
 
12
(deftest if.2
 
13
  (if nil 1 2)
 
14
  2)
 
15
 
 
16
(deftest if.3 (if t (values) 'a))
 
17
 
 
18
(deftest if.4
 
19
  (if nil 'a)
 
20
  nil)
 
21
 
 
22
(deftest if.5
 
23
  (if t (values 'a 'b 'c) 'd)
 
24
  a b c)
 
25
 
 
26
(deftest if.6
 
27
  (if nil 'a (values 'b 'c 'd))
 
28
  b c d)
 
29
 
 
30
(deftest if.7 (if nil 'a (values)))
 
31
 
 
32
(deftest if.order.1
 
33
  (let ((i 0))
 
34
    (values (if (= (incf i) 1) 't nil) i))
 
35
  t 1)