summaryrefslogtreecommitdiff
path: root/src/tests/ector
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/ector
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/ector')
-rw-r--r--src/tests/ector/suite/ector_suite.c13
-rw-r--r--src/tests/ector/suite/ector_test_init.c2
2 files changed, 12 insertions, 3 deletions
diff --git a/src/tests/ector/suite/ector_suite.c b/src/tests/ector/suite/ector_suite.c
index 9f04a64..d2d3d92 100644
--- a/src/tests/ector/suite/ector_suite.c
+++ b/src/tests/ector/suite/ector_suite.c
@@ -22,12 +22,23 @@
22 22
23#include "ector_suite.h" 23#include "ector_suite.h"
24#include "../efl_check.h" 24#include "../efl_check.h"
25#include <Ector.h>
25 26
26static const Efl_Test_Case etc[] = { 27static const Efl_Test_Case etc[] = {
27 { "init", ector_test_init }, 28 { "init", ector_test_init },
28 { NULL, NULL } 29 { NULL, NULL }
29}; 30};
30 31
32SUITE_INIT(ector)
33{
34 ck_assert_int_eq(ector_init(), 1);
35}
36
37SUITE_SHUTDOWN(ector)
38{
39 ck_assert_int_eq(ector_shutdown(), 0);
40}
41
31int 42int
32main(int argc, char *argv[]) 43main(int argc, char *argv[])
33{ 44{
@@ -41,7 +52,7 @@ main(int argc, char *argv[])
41#endif 52#endif
42 53
43 failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1, 54 failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1,
44 "Ector", etc); 55 "Ector", etc, SUITE_INIT_FN(ector), SUITE_SHUTDOWN_FN(ector));
45 56
46 return (failed_count == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 57 return (failed_count == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
47} 58}
diff --git a/src/tests/ector/suite/ector_test_init.c b/src/tests/ector/suite/ector_test_init.c
index fd19c3d..6a1dddf 100644
--- a/src/tests/ector/suite/ector_test_init.c
+++ b/src/tests/ector/suite/ector_test_init.c
@@ -26,8 +26,6 @@
26 26
27EFL_START_TEST(ector_init_simple) 27EFL_START_TEST(ector_init_simple)
28{ 28{
29 fail_if(ector_init() != 1);
30 fail_if(ector_shutdown() != 0);
31} 29}
32EFL_END_TEST 30EFL_END_TEST
33 31