summaryrefslogtreecommitdiff
path: root/src/tests/ecore/ecore_test_ecore.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-06-29 14:56:26 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-06-29 15:01:34 +0900
commit2b9e9b366798c5112e795992ef16d19dceee413e (patch)
tree98dd02972fd2b696f4030028b0fbef3154589b17 /src/tests/ecore/ecore_test_ecore.c
parentf44235d088b6b0953e1ddb84633b2c6ee176c8be (diff)
ecore: Add basic test case for efl version
Not very useful test but still good to make sure we preserve the API.
Diffstat (limited to 'src/tests/ecore/ecore_test_ecore.c')
-rw-r--r--src/tests/ecore/ecore_test_ecore.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/tests/ecore/ecore_test_ecore.c b/src/tests/ecore/ecore_test_ecore.c
index 1c287f5229..c6d294a236 100644
--- a/src/tests/ecore/ecore_test_ecore.c
+++ b/src/tests/ecore/ecore_test_ecore.c
@@ -848,6 +848,35 @@ START_TEST(ecore_test_efl_loop_register)
848} 848}
849END_TEST 849END_TEST
850 850
851START_TEST(ecore_test_efl_app_version)
852{
853 Efl_Version *ver;
854 Eo *loop;
855
856 ecore_init();
857
858 loop = efl_loop_main_get(EFL_LOOP_CLASS);
859 fail_if(!eo_isa(loop, EFL_LOOP_CLASS));
860
861 efl_build_version_set(EFL_VERSION_MAJOR, EFL_VERSION_MINOR, 0, 0, NULL, EFL_BUILD_ID);
862 ver = efl_loop_app_efl_version_get(loop);
863 fail_if(!ver);
864 fail_if(ver->major != EFL_VERSION_MAJOR);
865 fail_if(ver->minor != EFL_VERSION_MINOR);
866 fail_if(ver->micro != 0);
867 fail_if(ver->revision != 0);
868 fail_if(ver->flavor);
869 fail_if(!eina_streq(ver->build_id, EFL_BUILD_ID));
870
871 ver = efl_loop_efl_version_get(loop);
872 fail_if(!ver);
873 fail_if(ver->major != EFL_VERSION_MAJOR);
874 fail_if(ver->minor != EFL_VERSION_MINOR);
875
876 ecore_shutdown();
877}
878END_TEST
879
851void ecore_test_ecore(TCase *tc) 880void ecore_test_ecore(TCase *tc)
852{ 881{
853 tcase_add_test(tc, ecore_test_ecore_init); 882 tcase_add_test(tc, ecore_test_ecore_init);
@@ -868,4 +897,5 @@ void ecore_test_ecore(TCase *tc)
868 tcase_add_test(tc, ecore_test_efl_loop_fd); 897 tcase_add_test(tc, ecore_test_efl_loop_fd);
869 tcase_add_test(tc, ecore_test_efl_loop_fd_lifecycle); 898 tcase_add_test(tc, ecore_test_efl_loop_fd_lifecycle);
870 tcase_add_test(tc, ecore_test_efl_loop_register); 899 tcase_add_test(tc, ecore_test_efl_loop_register);
900 tcase_add_test(tc, ecore_test_efl_app_version);
871} 901}