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

« back to all changes in this revision

Viewing changes to ansi-tests/keywordp.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:  Sat Jun 14 05:46:51 2003
 
4
;;;; Contains: Tests of KEYWORDP
 
5
 
 
6
(in-package :cl-test)
 
7
 
 
8
 
 
9
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
10
;;; keywordp
 
11
 
 
12
(deftest keywordp.1 (keywordp 'hefalump)   nil)
 
13
(deftest keywordp.2 (keywordp 17)          nil)
 
14
(deftest keywordp.3 (notnot-mv (keywordp :stream))         t)
 
15
(deftest keywordp.4 (notnot-mv (keywordp ':stream))        t)
 
16
(deftest keywordp.5 (keywordp nil)         nil)
 
17
(deftest keywordp.6 (notnot-mv (keywordp :nil))          t)
 
18
(deftest keywordp.7 (keywordp '(:stream))    nil)
 
19
(deftest keywordp.8 (keywordp "rest")     nil)
 
20
(deftest keywordp.9 (keywordp ":rest")    nil)
 
21
(deftest keywordp.10 (keywordp '&body) nil)
 
22
;;; This next test was busted.  ::foo is not portable syntax
 
23
;;(deftest keywordp.11 (notnot-mv (keywordp ::foo))       t)
 
24
(deftest keywordp.12 (keywordp t)          nil)
 
25
 
 
26
(deftest keywordp.order.1
 
27
  (let ((i 0))
 
28
    (values (keywordp (progn (incf i) nil)) i))
 
29
  nil 1)
 
30
 
 
31
(deftest keywordp.error.1 (signals-error (keywordp) program-error) t)
 
32
(deftest keywordp.error.2 (signals-error (keywordp :x :x) program-error) t)