summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-06-26 09:54:45 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-06-26 09:54:55 -0400
commit03077e238e8a38b0811601a396b99c01a581281e (patch)
tree922086e092b73b12e8436300666317ae6ff4b95f
parent4fe13887cab6c42154f3a5d846f5c01c7e3df5d7 (diff)
efl_ui_suite: remove duplicated code
Summary: there is a helper for this function, lets use it. Depends on D9181 Reviewers: stefan_schmidt, segfaultxavi, zmike, Jaehyun_Cho Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9182
-rw-r--r--src/tests/elementary/efl_ui_test_active_view.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/src/tests/elementary/efl_ui_test_active_view.c b/src/tests/elementary/efl_ui_test_active_view.c
index c471b4b7c6..44c5250bb5 100644
--- a/src/tests/elementary/efl_ui_test_active_view.c
+++ b/src/tests/elementary/efl_ui_test_active_view.c
@@ -5,14 +5,13 @@
5#include <Efl_Ui.h> 5#include <Efl_Ui.h>
6#include "efl_ui_suite.h" 6#include "efl_ui_suite.h"
7#include "eo_internal.h" 7#include "eo_internal.h"
8#include "suite_helpers.h"
8 9
9EFL_CLASS_SIMPLE_CLASS(efl_ui_active_view_view_manager, "efl_ui_active_view_view_manager", EFL_UI_ACTIVE_VIEW_VIEW_MANAGER_CLASS); 10EFL_CLASS_SIMPLE_CLASS(efl_ui_active_view_view_manager, "efl_ui_active_view_view_manager", EFL_UI_ACTIVE_VIEW_VIEW_MANAGER_CLASS);
10EFL_CLASS_SIMPLE_CLASS(efl_ui_active_view_indicator, "efl_ui_active_view_indicator", EFL_UI_ACTIVE_VIEW_INDICATOR_CLASS); 11EFL_CLASS_SIMPLE_CLASS(efl_ui_active_view_indicator, "efl_ui_active_view_indicator", EFL_UI_ACTIVE_VIEW_INDICATOR_CLASS);
11 12
12static Efl_Ui_Win *win; 13static Efl_Ui_Win *win;
13static Efl_Ui_Active_View_Container *container; 14static Efl_Ui_Active_View_Container *container;
14static int tree_abort;
15static int tree_abort_level;
16 15
17typedef struct { 16typedef struct {
18 struct { 17 struct {
@@ -609,22 +608,6 @@ EFL_START_TEST (efl_ui_active_view_test_pop3)
609EFL_END_TEST 608EFL_END_TEST
610 609
611static void 610static void
612_shutdown(void)
613{
614 eina_log_abort_on_critical_set(tree_abort);
615 eina_log_abort_on_critical_level_set(tree_abort_level);
616}
617
618static void
619_setup(void)
620{
621 tree_abort = eina_log_abort_on_critical_get();
622 tree_abort_level = eina_log_abort_on_critical_level_get();
623 eina_log_abort_on_critical_level_set(2);
624 eina_log_abort_on_critical_set(1);
625}
626
627static void
628active_view_setup() 611active_view_setup()
629{ 612{
630 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), 613 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
@@ -645,7 +628,7 @@ active_view_teardown()
645 628
646void efl_ui_test_active_view(TCase *tc) 629void efl_ui_test_active_view(TCase *tc)
647{ 630{
648 tcase_add_checked_fixture(tc, _setup, _shutdown); 631 tcase_add_checked_fixture(tc, fail_on_errors_setup, fail_on_errors_teardown);
649 tcase_add_checked_fixture(tc, active_view_setup, active_view_teardown); 632 tcase_add_checked_fixture(tc, active_view_setup, active_view_teardown);
650 tcase_add_test(tc, efl_ui_active_view_init); 633 tcase_add_test(tc, efl_ui_active_view_init);
651 tcase_add_test(tc, efl_ui_active_view_active_index); 634 tcase_add_test(tc, efl_ui_active_view_active_index);