Changeset 6a90967


Ignore:
Timestamp:
2006-12-06T13:26:22Z (14 years ago)
Author:
Jelmer Vernooij <jelmer@…>
Branches:
master
Children:
3b4cc8f
Parents:
2c7df62
Message:

Add tests for md5.

Location:
tests
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • tests/Makefile

    r2c7df62 r6a90967  
    1111main_objs = account.o bitlbee.o conf.o crypting.o help.o ipc.o irc.o irc_commands.o log.o nick.o query.o root_commands.o set.o storage.o storage_xml.o storage_text.o user.o
    1212
    13 test_objs = check.o check_util.o check_nick.o
     13test_objs = check.o check_util.o check_nick.o check_md5.o
    1414
    1515check: $(test_objs) $(addprefix ../, $(main_objs)) ../protocols/protocols.o ../lib/lib.o
  • tests/check.c

    r2c7df62 r6a90967  
    44#include <check.h>
    55#include "bitlbee.h"
     6#include "testsuite.h"
    67
    78global_t global;        /* Against global namespace pollution */
     9
     10gboolean g_io_channel_pair(GIOChannel **ch1, GIOChannel **ch2)
     11{
     12        int sock[2];
     13        if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNIX, sock) < 0) {
     14                perror("socketpair");
     15                return FALSE;
     16        }
     17
     18        *ch1 = g_io_channel_unix_new(sock[0]);
     19        *ch2 = g_io_channel_unix_new(sock[1]);
     20        return TRUE;
     21}
    822
    923double gettime()
     
    2135Suite *nick_suite(void);
    2236
     37/* From check_md5.c */
     38Suite *md5_suite(void);
     39
    2340int main (void)
    2441{
     
    2643        SRunner *sr = srunner_create(util_suite());
    2744        srunner_add_suite(sr, nick_suite());
     45        srunner_add_suite(sr, md5_suite());
    2846        srunner_run_all (sr, CK_NORMAL);
    2947        nf = srunner_ntests_failed(sr);
Note: See TracChangeset for help on using the changeset viewer.