source: trunk/source/tests/ansi-tests/hash-table-p.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: 857 bytes
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Tue Sep 16 21:58:37 2003
4;;;; Contains: Tests for HASH-TABLE-P
5
6(in-package :cl-test)
7
8(deftest hash-table-p.1
9  (loop for e in '(nil t 1 10.0 (a b c) #(a b c) #*1011
10                       #0aNIL #2a((a b)(c d)) #p"foo"
11                       "bar" #\a 3/5 #c(1.0 2.0))
12        when (hash-table-p e)
13        collect e)
14  nil)
15
16(deftest hash-table-p.2
17  (check-type-predicate #'hash-table-p 'hash-table)
18  nil)
19
20(deftest hash-table-p.3
21  (let ((i 0))
22    (values (hash-table-p (incf i)) i))
23  nil 1)
24
25(deftest hash-table-p.4
26  (hash-table-p t)
27  nil)
28
29(deftest hash-table-p.5
30  (notnot-mv (hash-table-p (make-hash-table)))
31  t)
32
33(deftest hash-table-p.error.1
34  (signals-error (hash-table-p) program-error)
35  t)
36
37(deftest hash-table-p.error.2
38  (signals-error (let ((h (make-hash-table))) (hash-table-p h nil))
39                 program-error)
40  t)
41
Note: See TracBrowser for help on using the repository browser.