source: trunk/source/tests/ansi-tests/hash-table-test.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: 1.1 KB
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Fri Nov 28 05:56:22 2003
4;;;; Contains: Tests for HASH-TABLE-TEST
5
6(in-package :cl-test)
7
8(deftest hash-table-test.1
9  (hash-table-test (make-hash-table))
10  eql)
11
12(deftest hash-table-test.2
13  (loop for test in '(eq eql equal equalp)
14        unless (eq (hash-table-test (make-hash-table :test test)) test)
15        collect test)
16  nil)
17
18(deftest hash-table-test.3
19  (loop for test in '(eq eql equal equalp)
20        unless (eq (hash-table-test (make-hash-table
21                                     :test (symbol-function test)))
22                   test)
23        collect test)
24  nil)
25
26(deftest hash-table-test.4
27  (loop for test in '(eq eql equal equalp)
28        unless (eq (hash-table-test (make-hash-table
29                                     :test (eval `(function ,test))))
30                   test)
31        collect test)
32  nil)
33
34;;; Error cases
35
36(deftest hash-table-test.error.1
37  (signals-error (hash-table-test) program-error)
38  t)
39
40(deftest hash-table-test.error.2
41  (signals-error (hash-table-test (make-hash-table) nil)  program-error)
42  t)
43
44(deftest hash-table-test.error.3
45  (check-type-error #'hash-table-test #'hash-table-p)
46  nil)
Note: See TracBrowser for help on using the repository browser.