diff options
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/eina_graph_suite.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/tests/eina_graph_suite.c b/src/tests/eina_graph_suite.c new file mode 100644 index 0000000..79c02aa --- /dev/null +++ b/src/tests/eina_graph_suite.c @@ -0,0 +1,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); +} |