summaryrefslogtreecommitdiff
path: root/src/tests/elementary/elm_suite.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-03-27 13:51:13 -0400
committerStefan Schmidt <stefan@osg.samsung.com>2018-04-05 11:10:26 +0200
commit624925fe6e9c72c639d47135d5ea70d4110ac1fe (patch)
treeb57c12a611bf3b4b492327a7fcb5722cd39dad5b /src/tests/elementary/elm_suite.c
parent730020c7d4a87daf60cbfbb3a0a912b4f75d8cb5 (diff)
tests: move to using checked fixtures for all test suites
individual tests should not need to explicitly call init/shutdown functions in most cases, and many did not properly do this anyway see followup commit which resolves some issues with eina tests ref T6813 ref T6811 Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
Diffstat (limited to 'src/tests/elementary/elm_suite.c')
-rw-r--r--src/tests/elementary/elm_suite.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/tests/elementary/elm_suite.c b/src/tests/elementary/elm_suite.c
index e57e118..2cf66ac 100644
--- a/src/tests/elementary/elm_suite.c
+++ b/src/tests/elementary/elm_suite.c
@@ -88,6 +88,20 @@ static const Efl_Test_Case etc[] = {
88 { NULL, NULL } 88 { NULL, NULL }
89}; 89};
90 90
91SUITE_INIT(elm)
92{
93 char *args[] = { "exe" };
94 ck_assert_int_eq(elm_init(1, args), 1);
95}
96
97SUITE_SHUTDOWN(elm)
98{
99 ck_assert_int_eq(elm_shutdown(), 0);
100 /* verify that ecore was de-initialized completely */
101 ck_assert_int_eq(ecore_init(), 1);
102 ck_assert_int_eq(ecore_shutdown(), 0);
103}
104
91int 105int
92main(int argc, char **argv) 106main(int argc, char **argv)
93{ 107{
@@ -105,7 +119,7 @@ main(int argc, char **argv)
105 putenv("TESTS_GL_DISABLED=1"); 119 putenv("TESTS_GL_DISABLED=1");
106 120
107 failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1, 121 failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1,
108 "Elementary", etc); 122 "Elementary", etc, SUITE_INIT_FN(elm), SUITE_SHUTDOWN_FN(elm));
109 123
110 return (failed_count == 0) ? 0 : 255; 124 return (failed_count == 0) ? 0 : 255;
111} 125}