diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-12-06 14:26:22 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2006-12-06 14:26:22 +0100 |
commit | 6a909671115ba5fac94c212c249264bf25ec8840 (patch) | |
tree | 42d75376146fe818e2a35db2a1779bd8e5570f31 /tests/check.c | |
parent | 2c7df621d2337437a46b0ccee6a7801bc04db8f4 (diff) |
Add tests for md5.
Diffstat (limited to 'tests/check.c')
-rw-r--r-- | tests/check.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/check.c b/tests/check.c index 5cfb7dfd..294580b7 100644 --- a/tests/check.c +++ b/tests/check.c @@ -3,9 +3,23 @@ #include <gmodule.h> #include <check.h> #include "bitlbee.h" +#include "testsuite.h" global_t global; /* Against global namespace pollution */ +gboolean g_io_channel_pair(GIOChannel **ch1, GIOChannel **ch2) +{ + int sock[2]; + if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNIX, sock) < 0) { + perror("socketpair"); + return FALSE; + } + + *ch1 = g_io_channel_unix_new(sock[0]); + *ch2 = g_io_channel_unix_new(sock[1]); + return TRUE; +} + double gettime() { struct timeval time[1]; @@ -20,11 +34,15 @@ Suite *util_suite(void); /* From check_nick.c */ Suite *nick_suite(void); +/* From check_md5.c */ +Suite *md5_suite(void); + int main (void) { int nf; SRunner *sr = srunner_create(util_suite()); srunner_add_suite(sr, nick_suite()); + srunner_add_suite(sr, md5_suite()); srunner_run_all (sr, CK_NORMAL); nf = srunner_ntests_failed(sr); srunner_free(sr); |