From 576cdb6e0b1274e9fa5276e01337aef330dd4e8c Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sat, 23 Nov 2002 19:56:30 +0000 Subject: 2002-11-23 Havoc Pennington * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN _DBUS_INT_MAX * dbus/dbus-test.c (main): add list test, and include dbus-test.h as intended * dbus/dbus-hash.c (_dbus_hash_table_remove_string) (_dbus_hash_table_remove_int): return value indicates whether the entry existed to remove * dbus/dbus-list.c: add linked list utility class, with docs and tests * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket array sometimes. --- dbus/dbus-test.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'dbus/dbus-test.c') diff --git a/dbus/dbus-test.c b/dbus/dbus-test.c index 2eb862e2..ad01fe0c 100644 --- a/dbus/dbus-test.c +++ b/dbus/dbus-test.c @@ -22,23 +22,20 @@ */ #include "dbus-types.h" +#include "dbus-test.h" #include -/* To add a test, write a function like this one, - * declare it here, define it in the file to be tested, - * then call it from main() below. Test functions - * should return FALSE on failure. - */ -dbus_bool_t _dbus_hash_test (void); - int main (int argc, char **argv) { + printf ("%s: running linked list tests\n", argv[0]); + if (!_dbus_list_test ()) + return 1; + printf ("%s: running hash table tests\n", argv[0]); if (!_dbus_hash_test ()) return 1; - printf ("%s: completed successfully\n", argv[0]); return 0; -- cgit