summaryrefslogtreecommitdiff
path: root/src/tests/emile
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/emile
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/emile')
-rw-r--r--src/tests/emile/emile_suite.c13
-rw-r--r--src/tests/emile/emile_test_base.c2
2 files changed, 12 insertions, 3 deletions
diff --git a/src/tests/emile/emile_suite.c b/src/tests/emile/emile_suite.c
index 7fc70631e5..edfbf26a4a 100644
--- a/src/tests/emile/emile_suite.c
+++ b/src/tests/emile/emile_suite.c
@@ -4,6 +4,7 @@
4 4
5#include "emile_suite.h" 5#include "emile_suite.h"
6#include "../efl_check.h" 6#include "../efl_check.h"
7#include <Emile.h>
7 8
8static const Efl_Test_Case etc[] = { 9static const Efl_Test_Case etc[] = {
9 { "Emile_Base", emile_test_base }, 10 { "Emile_Base", emile_test_base },
@@ -11,6 +12,16 @@ static const Efl_Test_Case etc[] = {
11 { NULL, NULL } 12 { NULL, NULL }
12}; 13};
13 14
15SUITE_INIT(emile)
16{
17 ck_assert_int_eq(emile_init(), 1);
18}
19
20SUITE_SHUTDOWN(emile)
21{
22 ck_assert_int_eq(emile_shutdown(), 0);
23}
24
14int 25int
15main(int argc, char *argv[]) 26main(int argc, char *argv[])
16{ 27{
@@ -24,7 +35,7 @@ main(int argc, char *argv[])
24#endif 35#endif
25 36
26 failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1, 37 failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1,
27 "Emile", etc); 38 "Emile", etc, SUITE_INIT_FN(emile), SUITE_SHUTDOWN_FN(emile));
28 39
29 return (failed_count == 0) ? 0 : 255; 40 return (failed_count == 0) ? 0 : 255;
30} 41}
diff --git a/src/tests/emile/emile_test_base.c b/src/tests/emile/emile_test_base.c
index c76d7ab87a..0108edbe54 100644
--- a/src/tests/emile/emile_test_base.c
+++ b/src/tests/emile/emile_test_base.c
@@ -9,8 +9,6 @@
9 9
10EFL_START_TEST(emile_test_init) 10EFL_START_TEST(emile_test_init)
11{ 11{
12 fail_if(emile_init() <= 0);
13 fail_if(emile_shutdown() != 0);
14} 12}
15EFL_END_TEST 13EFL_END_TEST
16 14