summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-test.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2002-11-23 19:56:30 +0000
committerHavoc Pennington <hp@redhat.com>2002-11-23 19:56:30 +0000
commit576cdb6e0b1274e9fa5276e01337aef330dd4e8c (patch)
tree6904e387bd7f70f0452abe8b4359f66070965d33 /dbus/dbus-test.c
parentf09921965c769ff6411ae2f684f6b855d4c8f38d (diff)
2002-11-23 Havoc Pennington <hp@pobox.com>
* 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.
Diffstat (limited to 'dbus/dbus-test.c')
-rw-r--r--dbus/dbus-test.c13
1 files changed, 5 insertions, 8 deletions
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 <stdio.h>
-/* 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;