File: unit-test.c

package info (click to toggle)
libdmapsharing 3.9.13-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,340 kB
  • sloc: ansic: 17,285; sh: 4,782; xml: 556; makefile: 459
file content (49 lines) | stat: -rw-r--r-- 1,369 bytes parent folder | download | duplicates (2)
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
45
46
47
48
49
/* Machine-generated by ./generate-test-suites; do not edit. */

#include <check.h>
#include <glib.h>
#include <stdlib.h>
#include <libdmapsharing/dmap.h>

#include "../libdmapsharing/dmap-av-connection-suite.h"
#include "../libdmapsharing/dmap-av-record-suite.h"
#include "../libdmapsharing/dmap-av-share-suite.h"
#include "../libdmapsharing/dmap-connection-suite.h"
#include "../libdmapsharing/dmap-md5-suite.h"
#include "../libdmapsharing/dmap-utils-suite.h"

static void
debug_null (const char *log_domain,
            GLogLevelFlags log_level,
            const gchar *message,
            gpointer user_data)
{
}

void run_suite (Suite *s)
{
        int nf;
        SRunner *sr;

        sr = srunner_create(s);
        srunner_run_all(sr, CK_NORMAL);
        nf = srunner_ntests_failed(sr);
        srunner_free(sr);
        if (nf != 0) {
                exit (EXIT_FAILURE);
	}
}

int main(void)
{
        g_log_set_handler ("libdmapsharing", G_LOG_LEVEL_DEBUG, debug_null, NULL);
        g_log_set_handler (NULL, G_LOG_LEVEL_DEBUG, debug_null, NULL);
        run_suite(dmap_test_dmap_av_connection());
        run_suite(dmap_test_dmap_av_record());
        run_suite(dmap_test_dmap_av_share());
        run_suite(dmap_test_dmap_connection());
        run_suite(dmap_test_dmap_md5());
        run_suite(dmap_test_dmap_utils());

        exit (EXIT_SUCCESS);
}