stefan pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e02598cd4e0d040af7d35cd71a98a8710141324c

commit e02598cd4e0d040af7d35cd71a98a8710141324c
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Mon Apr 9 13:37:00 2018 +0200

    tests: split efl_loop tests out of efl_app_suite.c
    
    Summary: Depends on D5894
    
    Reviewers: stefan_schmidt
    
    Subscribers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D5895
---
 src/Makefile_Ecore.am               |  1 +
 src/tests/ecore/efl_app_suite.c     | 37 ++--------------------------
 src/tests/ecore/efl_app_suite.h     |  1 +
 src/tests/ecore/efl_app_test_loop.c | 49 +++++++++++++++++++++++++++++++++++++
 4 files changed, 53 insertions(+), 35 deletions(-)

diff --git a/src/Makefile_Ecore.am b/src/Makefile_Ecore.am
index c49b6ea1bf..3430ce196a 100644
--- a/src/Makefile_Ecore.am
+++ b/src/Makefile_Ecore.am
@@ -329,6 +329,7 @@ tests_ecore_ecore_suite_DEPENDENCIES = \
 @USE_ECORE_INPUT_INTERNAL_LIBS@
 
 tests_ecore_efl_app_suite_SOURCES = \
+tests/ecore/efl_app_test_loop.c \
 tests/ecore/efl_app_suite.c \
 tests/ecore/efl_app_suite.h
 
diff --git a/src/tests/ecore/efl_app_suite.c b/src/tests/ecore/efl_app_suite.c
index 93c972323f..1618120f46 100644
--- a/src/tests/ecore/efl_app_suite.c
+++ b/src/tests/ecore/efl_app_suite.c
@@ -10,38 +10,6 @@
 #include "efl_app_suite.h"
 #include "../efl_check.h"
 
-EFL_START_TEST(efl_app_test_efl_loop_register)
-{
-   Efl_Object *t, *n;
-
-   ecore_init();
-
-   t = efl_provider_find(efl_app_get(), EFL_LOOP_CLASS);
-   fail_if(!efl_isa(t, EFL_LOOP_CLASS));
-   fail_if(!efl_isa(t, EFL_APP_CLASS));
-
-   t = efl_provider_find(efl_app_get(), EFL_LOOP_TIMER_CLASS);
-   fail_if(t != NULL);
-
-   n = efl_add(EFL_LOOP_TIMER_CLASS, efl_app_get());
-   fail_if(n != NULL);
-
-   n = efl_add(EFL_LOOP_TIMER_CLASS, efl_app_get(),
-               efl_loop_timer_interval_set(efl_added, 1.0));
-   efl_loop_register(efl_app_get(), EFL_LOOP_TIMER_CLASS, n);
-
-   t = efl_provider_find(efl_app_get(), EFL_LOOP_TIMER_CLASS);
-   fail_if(!efl_isa(t, EFL_LOOP_TIMER_CLASS));
-   fail_if(t != n);
-
-   efl_loop_unregister(efl_app_get(), EFL_LOOP_TIMER_CLASS, n);
-
-   t = efl_provider_find(efl_app_get(), EFL_LOOP_TIMER_CLASS);
-   fail_if(t != NULL);
-
-   ecore_shutdown();
-}
-EFL_END_TEST
 
 EFL_START_TEST(efl_app_test_efl_build_version)
 {
@@ -74,13 +42,12 @@ EFL_END_TEST
 
 void efl_test_efl_app(TCase *tc)
 {
-   tcase_add_test(tc, efl_app_test_efl_loop_register);
    tcase_add_test(tc, efl_app_test_efl_build_version);
 }
 
-
 static const Efl_Test_Case etc[] = {
-  { "Efl_App", efl_test_efl_app },
+  { "App", efl_test_efl_app },
+  { "Loop", efl_app_test_efl_loop },
   { NULL, NULL }
 };
 
diff --git a/src/tests/ecore/efl_app_suite.h b/src/tests/ecore/efl_app_suite.h
index 5309a79657..ae273c0a76 100644
--- a/src/tests/ecore/efl_app_suite.h
+++ b/src/tests/ecore/efl_app_suite.h
@@ -4,5 +4,6 @@
 #include <check.h>
 #include "../efl_check.h"
 void efl_app_test_efl_app(TCase *tc);
+void efl_app_test_efl_loop(TCase *tc);
 
 #endif /* _EFL_APP_SUITE_H */
diff --git a/src/tests/ecore/efl_app_test_loop.c 
b/src/tests/ecore/efl_app_test_loop.c
new file mode 100644
index 0000000000..ddf0724449
--- /dev/null
+++ b/src/tests/ecore/efl_app_test_loop.c
@@ -0,0 +1,49 @@
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <unistd.h>
+#define EFL_NOLEGACY_API_SUPPORT
+#include <Efl_Core.h>
+#include <Efl_Net.h>
+#include "efl_app_suite.h"
+#include "../efl_check.h"
+
+EFL_START_TEST(efl_app_test_efl_loop_register)
+{
+   Efl_Object *t, *n;
+
+   ecore_init();
+
+   t = efl_provider_find(efl_app_get(), EFL_LOOP_CLASS);
+   fail_if(!efl_isa(t, EFL_LOOP_CLASS));
+   fail_if(!efl_isa(t, EFL_APP_CLASS));
+
+   t = efl_provider_find(efl_app_get(), EFL_LOOP_TIMER_CLASS);
+   fail_if(t != NULL);
+
+   n = efl_add(EFL_LOOP_TIMER_CLASS, efl_app_get());
+   fail_if(n != NULL);
+
+   n = efl_add(EFL_LOOP_TIMER_CLASS, efl_app_get(),
+               efl_loop_timer_interval_set(efl_added, 1.0));
+   efl_loop_register(efl_app_get(), EFL_LOOP_TIMER_CLASS, n);
+
+   t = efl_provider_find(efl_app_get(), EFL_LOOP_TIMER_CLASS);
+   fail_if(!efl_isa(t, EFL_LOOP_TIMER_CLASS));
+   fail_if(t != n);
+
+   efl_loop_unregister(efl_app_get(), EFL_LOOP_TIMER_CLASS, n);
+
+   t = efl_provider_find(efl_app_get(), EFL_LOOP_TIMER_CLASS);
+   fail_if(t != NULL);
+
+   ecore_shutdown();
+}
+EFL_END_TEST
+
+void efl_app_test_efl_loop(TCase *tc)
+{
+   tcase_add_test(tc, efl_app_test_efl_loop_register);
+}

-- 


Reply via email to