hash-table.lsp 943 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
;-*- Mode:     Lisp -*-
;;;; Author:   Paul Dietz
;;;; Created:  Sun Jan 26 21:30:42 2003
;;;; Contains: Tests of HASH-TABLE and related interface

(in-package :cl-test)

(deftest hash-table.1
  (notnot-mv (find-class 'hash-table))
  t)

(deftest hash-table.2
  (loop for e in '(nil t 1 10.0 (a b c) #(a b c) #*1011
sds's avatar
sds committed
14 15 16 17
                       #0aNIL #2a((a b)(c d)) #p"foo"
                       "bar" #\a 3/5 #c(1.0 2.0))
        when (typep e 'hash-table)
        collect e)
18 19 20 21 22
  nil)

(deftest hash-table.3
  (let ((c (find-class 'hash-table)))
    (loop for e in '(nil t 1 10.0 (a b c) #(a b c) #*1011
sds's avatar
sds committed
23 24 25 26
                         #0aNIL #2a((a b)(c d)) #p"foo"
                         "bar" #\a 3/5 #c(1.0 2.0))
          when (typep e c)
          collect e))
27 28 29 30 31 32 33 34 35 36
  nil)

(deftest hash-table.4
  (notnot-mv (typep (make-hash-table) 'hash-table))
  t)

(deftest hash-table.5
  (notnot-mv (typep (make-hash-table) (find-class 'hash-table)))
  t)

37

38

sds's avatar
sds committed
39

40 41