summaryrefslogtreecommitdiff
path: root/src/tests/efreet
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/efreet
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/efreet')
-rw-r--r--src/tests/efreet/efreet_suite.c13
-rw-r--r--src/tests/efreet/efreet_test_efreet.c7
-rw-r--r--src/tests/efreet/efreet_test_efreet_cache.c8
3 files changed, 13 insertions, 15 deletions
diff --git a/src/tests/efreet/efreet_suite.c b/src/tests/efreet/efreet_suite.c
index 4632153..ea1161e 100644
--- a/src/tests/efreet/efreet_suite.c
+++ b/src/tests/efreet/efreet_suite.c
@@ -4,6 +4,7 @@
4 4
5#include "efreet_suite.h" 5#include "efreet_suite.h"
6#include "../efl_check.h" 6#include "../efl_check.h"
7#include <Efreet.h>
7 8
8static const Efl_Test_Case etc[] = { 9static const Efl_Test_Case etc[] = {
9 { "Efreet", efreet_test_efreet }, 10 { "Efreet", efreet_test_efreet },
@@ -11,6 +12,16 @@ static const Efl_Test_Case etc[] = {
11 { NULL, NULL } 12 { NULL, NULL }
12}; 13};
13 14
15SUITE_INIT(efreet)
16{
17 ck_assert_int_eq(efreet_init(), 1);
18}
19
20SUITE_SHUTDOWN(efreet)
21{
22 ck_assert_int_eq(efreet_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 "Efreet", etc); 38 "Efreet", etc, SUITE_INIT_FN(efreet), SUITE_SHUTDOWN_FN(efreet));
28 39
29 return (failed_count == 0) ? 0 : 255; 40 return (failed_count == 0) ? 0 : 255;
30} 41}
diff --git a/src/tests/efreet/efreet_test_efreet.c b/src/tests/efreet/efreet_test_efreet.c
index 2a74309..eec3b7f 100644
--- a/src/tests/efreet/efreet_test_efreet.c
+++ b/src/tests/efreet/efreet_test_efreet.c
@@ -9,13 +9,6 @@
9 9
10EFL_START_TEST(efreet_test_efreet_init) 10EFL_START_TEST(efreet_test_efreet_init)
11{ 11{
12 int ret;
13
14 ret = efreet_init();
15 fail_if(ret != 1);
16
17 ret = efreet_shutdown();
18 fail_if(ret != 0);
19} 12}
20EFL_END_TEST 13EFL_END_TEST
21 14
diff --git a/src/tests/efreet/efreet_test_efreet_cache.c b/src/tests/efreet/efreet_test_efreet_cache.c
index afb1549..83f882d 100644
--- a/src/tests/efreet/efreet_test_efreet_cache.c
+++ b/src/tests/efreet/efreet_test_efreet_cache.c
@@ -9,13 +9,7 @@
9 9
10EFL_START_TEST(efreet_test_efreet_cache_init) 10EFL_START_TEST(efreet_test_efreet_cache_init)
11{ 11{
12 int ret; 12 /* FIXME: this should maybe do something? */
13
14 ret = efreet_init();
15 fail_if(ret != 1);
16
17 ret = efreet_shutdown();
18 fail_if(ret != 0);
19} 13}
20EFL_END_TEST 14EFL_END_TEST
21 15