summaryrefslogtreecommitdiff
path: root/src/tests/ecore/ecore_test_ecore.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-02-26 13:18:54 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-02-26 14:02:51 -0500
commit3e94be5d73256a7f5c02d3a9474173226be7beff (patch)
treee4dc2ae168815cb2d0aadb14a52db72caec9588e /src/tests/ecore/ecore_test_ecore.c
parent28fe00b94e55575c15684959b89a614d5a579309 (diff)
efl: add test suite for efl_app
this moves existing tests out of the ecore suite and into a new one, adds some checks to verify loop object parenting, and verifies compile for Efl_Core.h and Efl_Net.h using EFL_NOLEGACY_API_SUPPORT
Diffstat (limited to 'src/tests/ecore/ecore_test_ecore.c')
-rw-r--r--src/tests/ecore/ecore_test_ecore.c63
1 files changed, 0 insertions, 63 deletions
diff --git a/src/tests/ecore/ecore_test_ecore.c b/src/tests/ecore/ecore_test_ecore.c
index de04c643cc..f94e9055b5 100644
--- a/src/tests/ecore/ecore_test_ecore.c
+++ b/src/tests/ecore/ecore_test_ecore.c
@@ -857,67 +857,6 @@ START_TEST(ecore_test_ecore_main_loop_poller_add_del)
857} 857}
858END_TEST 858END_TEST
859 859
860START_TEST(ecore_test_efl_loop_register)
861{
862 Efl_Object *t, *n;
863
864 ecore_init();
865
866 t = efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_CLASS);
867 fail_if(!efl_isa(t, EFL_LOOP_CLASS));
868
869 t = efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_TIMER_CLASS);
870 fail_if(t != NULL);
871
872 n = efl_add(EFL_LOOP_TIMER_CLASS, efl_app_main_loop_get(efl_app_get()));
873 fail_if(n != NULL);
874
875 n = efl_add(EFL_LOOP_TIMER_CLASS, efl_app_main_loop_get(efl_app_get()),
876 efl_loop_timer_interval_set(efl_added, 1.0));
877 efl_loop_register(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_TIMER_CLASS, n);
878
879 t = efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_TIMER_CLASS);
880 fail_if(!efl_isa(t, EFL_LOOP_TIMER_CLASS));
881 fail_if(t != n);
882
883 efl_loop_unregister(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_TIMER_CLASS, n);
884
885 t = efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_TIMER_CLASS);
886 fail_if(t != NULL);
887
888 ecore_shutdown();
889}
890END_TEST
891
892START_TEST(ecore_test_efl_build_version)
893{
894 const Efl_Version *ver;
895 Eo *app;
896
897 ecore_init();
898
899 app = efl_app_get();
900 fail_if(!efl_isa(app, EFL_APP_CLASS));
901
902 efl_build_version_set(EFL_VERSION_MAJOR, EFL_VERSION_MINOR, 0, 0, NULL, EFL_BUILD_ID);
903 ver = efl_app_build_efl_version_get(app);
904 fail_if(!ver);
905 fail_if(ver->major != EFL_VERSION_MAJOR);
906 fail_if(ver->minor != EFL_VERSION_MINOR);
907 fail_if(ver->micro != 0);
908 fail_if(ver->revision != 0);
909 fail_if(ver->flavor);
910 fail_if(!eina_streq(ver->build_id, EFL_BUILD_ID));
911
912 ver = efl_app_efl_version_get(app);
913 fail_if(!ver);
914 fail_if(ver->major != EFL_VERSION_MAJOR);
915 fail_if(ver->minor != EFL_VERSION_MINOR);
916
917 ecore_shutdown();
918}
919END_TEST
920
921void ecore_test_ecore(TCase *tc) 860void ecore_test_ecore(TCase *tc)
922{ 861{
923 tcase_add_test(tc, ecore_test_ecore_init); 862 tcase_add_test(tc, ecore_test_ecore_init);
@@ -940,6 +879,4 @@ void ecore_test_ecore(TCase *tc)
940 tcase_add_test(tc, ecore_test_ecore_main_loop_poller_add_del); 879 tcase_add_test(tc, ecore_test_ecore_main_loop_poller_add_del);
941 tcase_add_test(tc, ecore_test_efl_loop_fd); 880 tcase_add_test(tc, ecore_test_efl_loop_fd);
942 tcase_add_test(tc, ecore_test_efl_loop_fd_lifecycle); 881 tcase_add_test(tc, ecore_test_efl_loop_fd_lifecycle);
943 tcase_add_test(tc, ecore_test_efl_loop_register);
944 tcase_add_test(tc, ecore_test_efl_build_version);
945} 882}