summaryrefslogtreecommitdiffstats
path: root/src/tests/eina_graph_suite.c
blob: 79c02aa339ec09340d7a29dcbe3fbaac289bad2b (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
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */

#include <check.h>
#include "Eina_Graph.h"


START_TEST (test_eina_graph_lib)
{
   ck_assert(eina_graph_init() == 1);
   ck_assert(eina_graph_init() == 2);

   ck_assert(eina_graph_shutdown() == 1);
   ck_assert(eina_graph_shutdown() == 0);
}
END_TEST

Suite *
eina_graph_suite (void)
{
   Suite *s = suite_create ("Eina Graph");

   TCase *tc_core = tcase_create ("Core");
   tcase_add_test (tc_core, test_eina_graph_lib);
   suite_add_tcase (s, tc_core);

   return s;
}

int
main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
{
   int number_failed;
   Suite *s = eina_graph_suite();
   SRunner *sr = srunner_create(s);
   srunner_run_all(sr, CK_ENV);
   number_failed = srunner_ntests_failed(sr);
   srunner_free(sr);
   return ((number_failed == 0) ? 0: 1);
}