forked from enlightenment/efl
Fix bug reported by Vincent Torri and add a test to trigger it.
SVN revision: 36041
This commit is contained in:
parent
fb44db2211
commit
eeb52f487a
|
@ -198,7 +198,7 @@ eina_counter_stop(Eina_Counter *counter, int specimen)
|
|||
|
||||
clk = (Eina_Clock *) counter->clocks;
|
||||
|
||||
if (clk->valid == EINA_TRUE) return ;
|
||||
if (!clk || clk->valid == EINA_TRUE) return ;
|
||||
|
||||
clk->end = tp;
|
||||
clk->specimen = specimen;
|
||||
|
|
|
@ -66,9 +66,27 @@ START_TEST(eina_counter_simple)
|
|||
}
|
||||
END_TEST
|
||||
|
||||
START_TEST(eina_counter_break)
|
||||
{
|
||||
Eina_Counter *cnt;
|
||||
|
||||
eina_counter_init();
|
||||
|
||||
cnt = eina_counter_add("eina_test");
|
||||
fail_if(!cnt);
|
||||
|
||||
eina_counter_stop(cnt, 10);
|
||||
|
||||
eina_counter_delete(cnt);
|
||||
|
||||
eina_counter_shutdown();
|
||||
}
|
||||
END_TEST
|
||||
|
||||
void eina_test_counter(TCase *tc)
|
||||
{
|
||||
tcase_add_test(tc, eina_counter_init_shutdown);
|
||||
tcase_add_test(tc, eina_counter_simple);
|
||||
tcase_add_test(tc, eina_counter_break);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue