summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-03-21 13:24:47 -0400
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-03-25 15:26:50 +0100
commitc249cb3c8bf38130f65ba666ea7ded3953579024 (patch)
tree384d8adcb2927b4fcb9a221d6822487ef94d7a96 /src/tests
parent1e54bb7d9ee9b1eaf25994c5b2508ea597cd0fe7 (diff)
tests: add function to do "real" timers
in very specific cases it's necessary to match the exact timing of internal functionality, so add a function to provide that capability Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8439
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/elementary/elm_suite.h1
-rw-r--r--src/tests/elementary/suite_helpers.c6
-rw-r--r--src/tests/elementary/suite_helpers.h1
3 files changed, 8 insertions, 0 deletions
diff --git a/src/tests/elementary/elm_suite.h b/src/tests/elementary/elm_suite.h
index bf169e32e9..ba76b29615 100644
--- a/src/tests/elementary/elm_suite.h
+++ b/src/tests/elementary/elm_suite.h
@@ -17,6 +17,7 @@
17 17
18#include <Evas.h> 18#include <Evas.h>
19#include <Ecore.h> 19#include <Ecore.h>
20#include "suite_helpers.h"
20 21
21void elm_test_config(TCase *tc); 22void elm_test_config(TCase *tc);
22void elm_test_check(TCase *tc); 23void elm_test_check(TCase *tc);
diff --git a/src/tests/elementary/suite_helpers.c b/src/tests/elementary/suite_helpers.c
index 9d870d2202..a57ae493fa 100644
--- a/src/tests/elementary/suite_helpers.c
+++ b/src/tests/elementary/suite_helpers.c
@@ -128,6 +128,12 @@ timer_add(double in, Ecore_Task_Cb cb, void *data)
128 return ecore_timer_add(in * TIMER_SCALE, cb, data); 128 return ecore_timer_add(in * TIMER_SCALE, cb, data);
129} 129}
130 130
131void *
132real_timer_add(double in, Ecore_Task_Cb cb, void *data)
133{
134 return ecore_timer_add(in, cb, data);
135}
136
131static void 137static void
132_win_manual_render(void *data, const Efl_Event *event EINA_UNUSED) 138_win_manual_render(void *data, const Efl_Event *event EINA_UNUSED)
133 { 139 {
diff --git a/src/tests/elementary/suite_helpers.h b/src/tests/elementary/suite_helpers.h
index ae49265ef4..903fa02929 100644
--- a/src/tests/elementary/suite_helpers.h
+++ b/src/tests/elementary/suite_helpers.h
@@ -6,5 +6,6 @@
6int suite_setup(Eina_Bool legacy); 6int suite_setup(Eina_Bool legacy);
7void _elm2_suite_init(void); 7void _elm2_suite_init(void);
8void _elm_suite_shutdown(void); 8void _elm_suite_shutdown(void);
9void *real_timer_add(double in, Ecore_Task_Cb cb, void *data);
9 10
10#endif 11#endif