stefan pushed a commit to branch master.

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

commit 774ac32f690181bcf2c106af81f2919bf81ecec5
Author: Mike Blumenkrantz <[email protected]>
Date:   Fri Jul 20 11:46:41 2018 -0400

    tests/ecore: remove tolerance threshold from ecore_timer_reset test case
    
    unit tests should test one thing only: testing timer accuracy and the
    effectiveness of resetting a timer in the same test leads to timing issues,
    so remove the timing component from the test
    
    ref T6878
    
    Differential Revision: https://phab.enlightenment.org/D6653
---
 src/tests/ecore/ecore_test_timer.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/tests/ecore/ecore_test_timer.c 
b/src/tests/ecore/ecore_test_timer.c
index b7661d0043..7b41b8bc1b 100644
--- a/src/tests/ecore/ecore_test_timer.c
+++ b/src/tests/ecore/ecore_test_timer.c
@@ -173,7 +173,6 @@ EFL_END_TEST
 typedef struct _Test_Inside_Call
 {
    Ecore_Timer *t;
-   double start;
    int it;
 } Test_Inside_Call;
 
@@ -182,9 +181,7 @@ _timeri_cb(void *data)
 {
    Test_Inside_Call *c = data;
 
-   fail_if(fabs((ecore_time_get() - c->start) - 0.011) > 0.01);
    ecore_timer_reset(c->t);
-   c->start = ecore_time_get();
 
    c->it--;
 
@@ -194,14 +191,21 @@ _timeri_cb(void *data)
    return EINA_FALSE;
 }
 
+static Eina_Bool
+timeout_timer_cb()
+{
+   ck_abort();
+   return EINA_FALSE;
+}
+
 EFL_START_TEST(ecore_test_timer_inside_call)
 {
    Test_Inside_Call *c;
 
    c = malloc(sizeof(Test_Inside_Call));
-   c->start = ecore_time_get();
    c->it = 5;
    c->t = ecore_timer_add(0.01, _timeri_cb, c);
+   ecore_timer_add(1.0, timeout_timer_cb, NULL);
 
    fail_if(!c->t, "Error add timer\n");
 

-- 


Reply via email to