diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2013-12-06 15:05:31 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2013-12-06 15:05:31 +0100 |
commit | ca99540270f229485e64caed4aa949e129ddf1d8 (patch) | |
tree | a7fd9f49078ceb25c6f4d01f0c8bb8505f78dd7c /src/tests/eina_graph_suite.c | |
download | eina_graph-ca99540270f229485e64caed4aa949e129ddf1d8.zip eina_graph-ca99540270f229485e64caed4aa949e129ddf1d8.tar.gz |
Initial commit
Diffstat (limited to 'src/tests/eina_graph_suite.c')
-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); +} |