1 |
# Copyright (C) 2004 by Kevin L. Mitchell <klmitch@mit.edu> |
2 |
# |
3 |
# This library is free software; you can redistribute it and/or |
4 |
# modify it under the terms of the GNU Library General Public |
5 |
# License as published by the Free Software Foundation; either |
6 |
# version 2 of the License, or (at your option) any later version. |
7 |
# |
8 |
# This library is distributed in the hope that it will be useful, |
9 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
11 |
# Library General Public License for more details. |
12 |
# |
13 |
# You should have received a copy of the GNU Library General Public |
14 |
# License along with this library; if not, write to the Free |
15 |
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, |
16 |
# MA 02111-1307, USA |
17 |
# |
18 |
# @(#)$Id: test-harness.dat,v 1.7 2004/09/25 14:17:24 klmitch Exp $ |
19 |
|
20 |
program t_linklists t_linklists \ |
21 |
"Test linked list functionality" |
22 |
|
23 |
test ll_init t_linklists PASS \ |
24 |
"Test that ll_init() may be called" |
25 |
test le_init t_linklists PASS \ |
26 |
"Test that le_init() may be called" |
27 |
test ll_add t_linklists PASS \ |
28 |
"Test that ll_add() works properly" |
29 |
test ll_move t_linklists PASS \ |
30 |
"Test that ll_move() works properly" |
31 |
test ll_remove t_linklists PASS \ |
32 |
"Test that ll_remove() works properly" |
33 |
test ll_find t_linklists PASS \ |
34 |
"Test that ll_find() works properly" |
35 |
test ll_iter t_linklists PASS \ |
36 |
"Test that ll_iter() works properly" |
37 |
test ll_flush t_linklists PASS \ |
38 |
"Test that ll_flush() works properly" |
39 |
|
40 |
program t_hashtab t_hashtab \ |
41 |
"Test hash table functionality" |
42 |
t_hashtab: t_linklists |
43 |
|
44 |
test ht_init t_hashtab PASS \ |
45 |
"Test that ht_init() may be called" |
46 |
test he_init t_hashtab PASS \ |
47 |
"Test that he_init() may be called" |
48 |
test ht_add t_hashtab PASS \ |
49 |
"Test that ht_add() adds entries to hash table" |
50 |
test ht_find t_hashtab PASS \ |
51 |
"Test that ht_find() finds entries in hash table" |
52 |
test ht_move t_hashtab PASS \ |
53 |
"Test that ht_move() moves entries around" |
54 |
test ht_remove t_hashtab PASS \ |
55 |
"Test that ht_remove() removes entries" |
56 |
test ht_iter t_hashtab PASS \ |
57 |
"Test that ht_iter() iterates properly" |
58 |
test ht_resize t_hashtab PASS \ |
59 |
"Test that ht_resize() may be called" |
60 |
test ht_flush t_hashtab PASS \ |
61 |
"Test that ht_flush() flushes the table" |
62 |
test ht_free t_hashtab PASS \ |
63 |
"Test that ht_free() may be called" |
64 |
test ht_add_autogrow t_hashtab PASS \ |
65 |
"Test that ht_add() automatically grows the table" |
66 |
test ht_find_autogrow t_hashtab PASS \ |
67 |
"Test that ht_find() can still find entries for autogrow" |
68 |
test ht_remove_autoshrink t_hashtab PASS \ |
69 |
"Test that ht_remove() automatically shrinks the table" |
70 |
test ht_find_autoshrink t_hashtab PASS \ |
71 |
"Test that ht_find() can still find entries for autoshrink" |
72 |
|
73 |
program t_smat t_smat \ |
74 |
"Test sparse matrix functionality" |
75 |
t_smat: t_linklists t_hashtab |
76 |
|
77 |
test st_init t_smat PASS \ |
78 |
"Test that st_init() may be called" |
79 |
test sh_init t_smat PASS \ |
80 |
"Test that sh_init() may be called" |
81 |
test st_add t_smat PASS \ |
82 |
"Test that st_add() adds elements to a sparse matrix" |
83 |
test st_find t_smat PASS \ |
84 |
"Test that st_find() can locate elements in a sparse matrix" |
85 |
test st_remove t_smat PASS \ |
86 |
"Test that st_remove() can remove elements in a sparse matrix" |
87 |
|
88 |
# Pretty much everything else is so simple and straightforward that it |
89 |
# should just work. If you do find a bug, write a test case for it :) |
90 |
|
91 |
program t_redblack t_redblack \ |
92 |
"Test red-black tree functionality" |
93 |
|
94 |
test rt_init t_redblack PASS \ |
95 |
"Test that rt_init() may be called" |
96 |
test rn_init t_redblack PASS \ |
97 |
"Test that rn_init() may be called" |
98 |
test rt_add t_redblack PASS \ |
99 |
"Test that rt_add() adds entries to the tree" |
100 |
test rt_find t_redblack PASS \ |
101 |
"Test that rt_find() finds entries in tree" |
102 |
test rt_remove t_redblack PASS \ |
103 |
"Test that rt_remove() removes nodes" |
104 |
test rt_flush t_redblack PASS \ |
105 |
"Test that rt_flush() flushes the tree" |
106 |
test rt_iter t_redblack PASS \ |
107 |
"Test that rt_iter() iterates over the tree in the correct order" |