blob: ec5bad0ce9de0fb6af42a1d5f6b438e6540d9b12 (
plain)
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
|
#include <check.h>
#include <opensync/opensync.h>
#include <opensync/opensync_internals.h>
#include <stdlib.h>
#include <glib.h>
#include <gmodule.h>
START_TEST (test_create)
{
OSyncMember *member = NULL;
member = osync_member_new(NULL);
fail_unless(member != NULL, "Member == NULL on creation");
}
END_TEST
Suite *member_suite(void)
{
Suite *s = suite_create("Member");
TCase *tc_core = tcase_create("Core");
suite_add_tcase (s, tc_core);
tcase_add_test(tc_core, test_create);
return s;
}
int main(void)
{
int nf;
Suite *s = member_suite();
SRunner *sr;
sr = srunner_create(s);
// srunner_set_fork_status (sr, CK_NOFORK);
srunner_run_all(sr, CK_NORMAL);
nf = srunner_ntests_failed(sr);
srunner_free(sr);
return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}
|