Changeset 7b05842


Ignore:
Timestamp:
2014-04-25T08:03:59Z (11 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
b95b0c8
Parents:
b4008a5 (diff), 6a6d7d8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merging test suite fixes from Jelmer.

Location:
tests
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • tests/Makefile

    rb4008a5 r7b05842  
    44endif
    55
    6 LFLAGS +=-lcheck
     6CFLAGS += $(shell pkg-config --cflags check)
     7LFLAGS += $(shell pkg-config --libs check)
    78
    8 all: check 
     9all: check
    910        ./check $(CHECKFLAGS)
    1011
  • tests/check.c

    rb4008a5 r7b05842  
    44#include <check.h>
    55#include <locale.h>
     6#include <sys/time.h>
    67#include "bitlbee.h"
    78#include "testsuite.h"
     
    8283                { NULL }
    8384        };
    84         int i;
    8585
    8686        pc = g_option_context_new("");
  • tests/check_help.c

    rb4008a5 r7b05842  
    1212        fail_if(r == NULL);
    1313        fail_if(r != h);
    14        
     14
    1515        help_free(&h);
    1616        fail_if(h != NULL);
     
    2121        r = help_init(&h, "/dev/null");
    2222        fail_unless(help_get(&h, "nonexistent") == NULL);
     23        fail_if(r == NULL);
    2324END_TEST
    2425
  • tests/check_md5.c

    rb4008a5 r7b05842  
    3737                tcase_fn_start (tests[i].str, __FILE__, __LINE__);
    3838                md5_state_t state;
    39                 int di;
    4039
    4140                md5_init(&state);
  • tests/check_set.c

    rb4008a5 r7b05842  
    2626
    2727START_TEST(test_set_find_unknown)
    28         set_t *s = NULL, *t;
     28        set_t *s = NULL;
    2929        fail_unless (set_find(&s, "foo") == NULL);
    3030END_TEST
     
    6969START_TEST(test_set_get_str_value)
    7070        void *data = "data";
    71         set_t *s = NULL, *t;
    72         t = set_add(&s, "name", "default", NULL, data);
     71        set_t *s = NULL;
     72        set_add(&s, "name", "default", NULL, data);
    7373        set_setstr(&s, "name", "foo");
    7474        fail_unless(strcmp(set_getstr(&s, "name"), "foo") == 0);
     
    8282START_TEST(test_setint)
    8383        void *data = "data";
    84         set_t *s = NULL, *t;
    85         t = set_add(&s, "name", "10", NULL, data);
     84        set_t *s = NULL;
     85        set_add(&s, "name", "10", NULL, data);
    8686        set_setint(&s, "name", 3);
    8787        fail_unless(set_getint(&s, "name") == 3);
     
    9090START_TEST(test_setstr)
    9191        void *data = "data";
    92         set_t *s = NULL, *t;
    93         t = set_add(&s, "name", "foo", NULL, data);
     92        set_t *s = NULL;
     93        set_add(&s, "name", "foo", NULL, data);
    9494        set_setstr(&s, "name", "bloe");
    9595        fail_unless(strcmp(set_getstr(&s, "name"), "bloe") == 0);
Note: See TracChangeset for help on using the changeset viewer.