Hello.

On 07/06/16 00:41, Cedric BAIL wrote:
> cedric pushed a commit to branch master.
>
> http://git.enlightenment.org/core/efl.git/commit/?id=cd0b50fada2543b3cc5f4706736a1154a7f258ac
>
> commit cd0b50fada2543b3cc5f4706736a1154a7f258ac
> Author: Cedric BAIL <[email protected]>
> Date:   Mon Jun 6 14:59:36 2016 -0700
>
>      ecore: add a tests that ensure we do implement lifecycle correctly.
> ---
>   src/tests/ecore/ecore_test_timer.c | 59 
> ++++++++++++++++++++++++++++++++++++++
>   1 file changed, 59 insertions(+)
>
> diff --git a/src/tests/ecore/ecore_test_timer.c 
> b/src/tests/ecore/ecore_test_timer.c
> index 747e33e..336538f 100644
> --- a/src/tests/ecore/ecore_test_timer.c
> +++ b/src/tests/ecore/ecore_test_timer.c
> @@ -242,9 +242,68 @@ START_TEST(ecore_test_timeout_cancel)
>   }
>   END_TEST
>   
> +static Eina_Bool
> +_test_time_cb(void *data)
> +{
> +   Eina_Bool *run = data;
> +
> +   *run = EINA_TRUE;
> +
> +   return EINA_TRUE;
> +}
> +
> +static Eina_Bool
> +_test_death_cb(void *data, const Eo_Event *ev EINA_UNUSED)
> +{
> +   Eina_Bool *die = data;
> +
> +   *die = EINA_TRUE;
> +
> +   return EINA_TRUE;
> +}
> +
> +static Eina_Bool
> +_test_run_cb(void *data, const Eo_Event *ev EINA_UNUSED)
> +{
> +   return _test_time_cb(data);
> +}
> +
> +START_TEST(ecore_test_timer_lifecycle)
> +{
> +   Eina_Bool rl = EINA_FALSE, re = EINA_FALSE;
> +   Eina_Bool dl = EINA_FALSE, de = EINA_FALSE;
> +   Ecore_Timer *t;
> +   Eo *et;
> +
> +   eo_init();
> +   ecore_init();
> +
> +   t = ecore_timer_add(1.0, _test_time_cb, &rl);
> +   eo_event_callback_add((Eo*) t, EO_EVENT_DEL, _test_death_cb, &dl);
> +
> +   et = eo_add(EFL_LOOP_TIMER_CLASS, ecore_main_loop_get(),
> +               eo_event_callback_add(eo_self, EFL_LOOP_TIMER_EVENT_TICK, 
> _test_run_cb, &re),
> +               eo_event_callback_add(eo_self, EO_EVENT_DEL, _test_death_cb, 
> &de),
> +               efl_loop_timer_interval_set(eo_self, 1.0));
> +   eo_ref(et);
> +
> +   ecore_shutdown();
> +
> +   fail_if(re == EINA_TRUE &&! rl == EINA_TRUE);

&&! looks like a typo to me. What did you intend to do here?

tests/ecore/ecore_test_timer.c:290:31: warning: logical not is only 
applied to the left hand side of comparison [-Wlogical-not-parentheses]
     fail_if(re == EINA_TRUE &&! rl == EINA_TRUE);

regards
Stefan Schmidt

> +   fail_if(dl == EINA_FALSE);
> +   fail_if(de == EINA_TRUE);
> +
> +   eo_del(et);
> +   fail_if(de == EINA_FALSE);
> +
> +   eo_shutdown();
> +}
> +END_TEST
> +
>   void ecore_test_timer(TCase *tc)
>   {
>     tcase_add_test(tc, ecore_test_timers);
>     tcase_add_test(tc, ecore_test_timeout);
>     tcase_add_test(tc, ecore_test_timeout_cancel);
> +  tcase_add_test(tc, ecore_test_timer_lifecycle);
>   }
>


------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to