summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-04-09 13:37:00 +0200
committerStefan Schmidt <stefan@osg.samsung.com>2018-04-10 11:28:01 +0200
commite02598cd4e0d040af7d35cd71a98a8710141324c (patch)
tree0e82bd6eab9db7041f9e062b016f1bba8711f43a
parentab8237d36d2359bd073a887b00c5db175152d54d (diff)
downloadefl-e02598cd4e0d040af7d35cd71a98a8710141324c.tar.gz
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
-rw-r--r--src/Makefile_Ecore.am1
-rw-r--r--src/tests/ecore/efl_app_suite.c37
-rw-r--r--src/tests/ecore/efl_app_suite.h1
-rw-r--r--src/tests/ecore/efl_app_test_loop.c49
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);
+}