tests: Pass the interval to elm_test_helper_wait_flag for the caller to change
Like JackDanielZ suggested.
This commit is contained in:
parent
568a47c19d
commit
057d5456c6
|
@ -69,13 +69,13 @@ START_TEST (elm_fileselector_selected)
|
|||
|
||||
selected = EINA_FALSE;
|
||||
ck_assert(elm_fileselector_selected_set(fileselector, path));
|
||||
ck_assert(elm_test_helper_wait_flag(&selected));
|
||||
ck_assert(elm_test_helper_wait_flag(10, &selected));
|
||||
|
||||
ck_assert_str_eq(elm_fileselector_selected_get(fileselector), path);
|
||||
|
||||
selected = EINA_FALSE;
|
||||
ck_assert(elm_fileselector_selected_set(fileselector, exist));
|
||||
ck_assert(elm_test_helper_wait_flag(&selected));
|
||||
ck_assert(elm_test_helper_wait_flag(10, &selected));
|
||||
|
||||
ck_assert_str_eq(elm_fileselector_selected_get(fileselector), exist);
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
#include <Ecore.h>
|
||||
#include "elm_suite.h"
|
||||
|
||||
const double timeout = 10;
|
||||
|
||||
typedef struct _Callback_Data
|
||||
{
|
||||
Ecore_Timer *timer;
|
||||
|
@ -24,12 +22,12 @@ timer_expired_cb(void *user_data)
|
|||
}
|
||||
|
||||
Eina_Bool
|
||||
elm_test_helper_wait_flag(Eina_Bool *done)
|
||||
elm_test_helper_wait_flag(double in, Eina_Bool *done)
|
||||
{
|
||||
Callback_Data data;
|
||||
|
||||
data.did_timeout = EINA_FALSE;
|
||||
data.timer = ecore_timer_add(timeout, timer_expired_cb, &data);
|
||||
data.timer = ecore_timer_add(in, timer_expired_cb, &data);
|
||||
|
||||
while (*done == EINA_FALSE && data.did_timeout == EINA_FALSE)
|
||||
ecore_main_loop_iterate();
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
|
||||
#include <Eina.h>
|
||||
|
||||
Eina_Bool elm_test_helper_wait_flag(Eina_Bool *done);
|
||||
Eina_Bool elm_test_helper_wait_flag(double in, Eina_Bool *done);
|
||||
|
||||
#endif /* _ELM_TEST_HELPER_H */
|
||||
|
|
Loading…
Reference in New Issue