efl_content: equip the tests with more lifetime checks

this can be used to detect more lifetime issues, which catched errors in
efl.ui.panel and efl.ui.scroller.

ref T8536

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10921
This commit is contained in:
Marcel Hollerbach 2019-12-19 10:50:52 +01:00 committed by Cedric BAIL
parent d1480d7762
commit c514d3363e
1 changed files with 9 additions and 1 deletions

View File

@ -27,6 +27,8 @@ EFL_START_TEST(content_set_get)
ck_assert_int_eq(efl_content_set(widget, (void*)0x1), EINA_FALSE);
EXPECT_ERROR_END;
ck_assert_ptr_eq(efl_content_get(widget), NULL);
ck_assert_int_eq(efl_alive_get(w), EINA_FALSE);
}
EFL_END_TEST
@ -39,7 +41,10 @@ EFL_START_TEST(content_set_get2)
ck_assert_ptr_eq(efl_content_get(widget), w);
ck_assert_int_eq(efl_content_set(widget, NULL), EINA_TRUE);
ck_assert_int_eq(efl_alive_get(w), EINA_FALSE);
ck_assert_ptr_eq(efl_content_get(widget), NULL);
efl_del(widget);
}
EFL_END_TEST
@ -49,8 +54,11 @@ EFL_START_TEST(content_unset)
Efl_Ui_Widget *w = create_test_widget();
ck_assert_int_eq(efl_content_set(widget, w), EINA_TRUE);
efl_content_unset(widget);
ck_assert_ptr_eq(efl_content_unset(widget), w);
ck_assert_ptr_eq(efl_content_get(widget), NULL);
efl_del(widget);
ck_assert_int_eq(efl_alive_get(w), EINA_TRUE);
}
EFL_END_TEST