summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-06-10 09:54:22 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-06-10 09:54:22 -0400
commit6e048a4069e0d938f8e678126385b40331e84f2e (patch)
tree2c9319c66ba1c2780a36bdb65399b8935875a509
parent2785c822d16d1d8e10456121b7a24054bb401cf7 (diff)
tests/efl_ui: reset active view counter structs between tests
Summary: this fixes running the tests with CK_FORK=no Reviewers: bu5hm4n Reviewed By: bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9080
-rw-r--r--src/tests/elementary/efl_ui_test_active_view.c77
1 files changed, 40 insertions, 37 deletions
diff --git a/src/tests/elementary/efl_ui_test_active_view.c b/src/tests/elementary/efl_ui_test_active_view.c
index 0024b669e2..8643fcb8ed 100644
--- a/src/tests/elementary/efl_ui_test_active_view.c
+++ b/src/tests/elementary/efl_ui_test_active_view.c
@@ -14,43 +14,6 @@ static Efl_Ui_Active_View_Container *container;
14static int tree_abort; 14static int tree_abort;
15static int tree_abort_level; 15static int tree_abort_level;
16 16
17static void
18_shutdown(void)
19{
20 eina_log_abort_on_critical_set(tree_abort);
21 eina_log_abort_on_critical_level_set(tree_abort_level);
22}
23
24static void
25_setup(void)
26{
27 tree_abort = eina_log_abort_on_critical_get();
28 tree_abort_level = eina_log_abort_on_critical_level_get();
29 eina_log_abort_on_critical_level_set(2);
30 eina_log_abort_on_critical_set(1);
31}
32static void
33active_view_setup()
34{
35 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
36 efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC));
37
38 container = efl_add(EFL_UI_ACTIVE_VIEW_CONTAINER_CLASS, win,
39 efl_content_set(win, efl_added));
40
41 efl_gfx_entity_size_set(win, EINA_SIZE2D(200, 200));
42}
43
44static void
45active_view_teardown()
46{
47 if (win)
48 {
49 efl_del(win);
50 win = NULL;
51 }
52}
53
54typedef struct { 17typedef struct {
55 struct { 18 struct {
56 int called; 19 int called;
@@ -556,6 +519,46 @@ EFL_START_TEST (efl_ui_active_view_active_index_not_update)
556} 519}
557EFL_END_TEST 520EFL_END_TEST
558 521
522static void
523_shutdown(void)
524{
525 eina_log_abort_on_critical_set(tree_abort);
526 eina_log_abort_on_critical_level_set(tree_abort_level);
527}
528
529static void
530_setup(void)
531{
532 tree_abort = eina_log_abort_on_critical_get();
533 tree_abort_level = eina_log_abort_on_critical_level_get();
534 eina_log_abort_on_critical_level_set(2);
535 eina_log_abort_on_critical_set(1);
536}
537
538static void
539active_view_setup()
540{
541 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
542 efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC));
543
544 container = efl_add(EFL_UI_ACTIVE_VIEW_CONTAINER_CLASS, win,
545 efl_content_set(win, efl_added));
546
547 efl_gfx_entity_size_set(win, EINA_SIZE2D(200, 200));
548}
549
550static void
551active_view_teardown()
552{
553 if (win)
554 {
555 efl_del(win);
556 win = NULL;
557 }
558 memset(&transition_calls, 0, sizeof(transition_calls));
559 memset(&indicator_calls, 0, sizeof(indicator_calls));
560}
561
559void efl_ui_test_active_view(TCase *tc) 562void efl_ui_test_active_view(TCase *tc)
560{ 563{
561 tcase_add_checked_fixture(tc, _setup, _shutdown); 564 tcase_add_checked_fixture(tc, _setup, _shutdown);