summaryrefslogtreecommitdiff
path: root/src/tests/ecore/ecore_test_ecore.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2016-06-16 15:10:49 -0700
committerCedric BAIL <cedric@osg.samsung.com>2016-06-22 13:19:13 -0700
commitae207a5be683c3f89087552a11fc7bd91128d71e (patch)
tree01e4aa2abcd582d8d04faf035adbf60db657866c /src/tests/ecore/ecore_test_ecore.c
parentec77773aa3bda5df1d3d745b9acfcd5eb0cd193a (diff)
ecore: add test for registered provider.
Diffstat (limited to 'src/tests/ecore/ecore_test_ecore.c')
-rw-r--r--src/tests/ecore/ecore_test_ecore.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/tests/ecore/ecore_test_ecore.c b/src/tests/ecore/ecore_test_ecore.c
index 41858c0558..1c287f5229 100644
--- a/src/tests/ecore/ecore_test_ecore.c
+++ b/src/tests/ecore/ecore_test_ecore.c
@@ -820,6 +820,34 @@ START_TEST(ecore_test_ecore_main_loop_poller_add_del)
820} 820}
821END_TEST 821END_TEST
822 822
823START_TEST(ecore_test_efl_loop_register)
824{
825 Eo_Base *t, *n;
826
827 ecore_init();
828
829 t = eo_provider_find(ecore_main_loop_get(), EFL_LOOP_CLASS);
830 fail_if(!eo_isa(t, EFL_LOOP_CLASS));
831
832 t = eo_provider_find(ecore_main_loop_get(), EFL_LOOP_TIMER_CLASS);
833 fail_if(t != NULL);
834
835 n = eo_add(EFL_LOOP_TIMER_CLASS, ecore_main_loop_get());
836 efl_loop_register(ecore_main_loop_get(), EFL_LOOP_TIMER_CLASS, n);
837
838 t = eo_provider_find(ecore_main_loop_get(), EFL_LOOP_TIMER_CLASS);
839 fail_if(!eo_isa(t, EFL_LOOP_TIMER_CLASS));
840 fail_if(t != n);
841
842 efl_loop_unregister(ecore_main_loop_get(), EFL_LOOP_TIMER_CLASS, n);
843
844 t = eo_provider_find(ecore_main_loop_get(), EFL_LOOP_TIMER_CLASS);
845 fail_if(t != NULL);
846
847 ecore_shutdown();
848}
849END_TEST
850
823void ecore_test_ecore(TCase *tc) 851void ecore_test_ecore(TCase *tc)
824{ 852{
825 tcase_add_test(tc, ecore_test_ecore_init); 853 tcase_add_test(tc, ecore_test_ecore_init);
@@ -839,4 +867,5 @@ void ecore_test_ecore(TCase *tc)
839 tcase_add_test(tc, ecore_test_ecore_main_loop_poller_add_del); 867 tcase_add_test(tc, ecore_test_ecore_main_loop_poller_add_del);
840 tcase_add_test(tc, ecore_test_efl_loop_fd); 868 tcase_add_test(tc, ecore_test_efl_loop_fd);
841 tcase_add_test(tc, ecore_test_efl_loop_fd_lifecycle); 869 tcase_add_test(tc, ecore_test_efl_loop_fd_lifecycle);
870 tcase_add_test(tc, ecore_test_efl_loop_register);
842} 871}