aboutsummaryrefslogtreecommitdiffstats
path: root/tests/check-main.c
blob: 9c497a7656f6ad5addffb1c283379e58922e9685 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <glib-object.h>

#include <check.h>

#include "check-helpers.h"
#include "check-libempathy.h"

#include "config.h"

static Suite *
make_libempathy_suite (void)
{
    Suite *s = suite_create ("libempathy");

    suite_add_tcase (s, make_empathy_utils_tcase ());
    suite_add_tcase (s, make_empathy_irc_server_tcase ());
    suite_add_tcase (s, make_empathy_irc_network_tcase ());
    suite_add_tcase (s, make_empathy_irc_network_manager_tcase ());
    suite_add_tcase (s, make_empathy_chatroom_tcase ());

    return s;
}

int
main (void)
{
    int number_failed = 0;
    Suite *s;
    SRunner *sr;

    check_helpers_init ();
    g_type_init ();

    s = make_libempathy_suite ();
    sr = srunner_create (s);
    srunner_run_all (sr, CK_NORMAL);
    number_failed += srunner_ntests_failed (sr);
    srunner_free (sr);

    return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}