Fix autotests for event queue.
Signed-off-by: Jan Vidar Krey <janvidar@extatic.org>
This commit is contained in:
parent
b1f84b5b4a
commit
7a9d40d8dd
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
static struct event_queue* eq;
|
static struct event_queue* eq;
|
||||||
static int eq_val;
|
static int eq_val;
|
||||||
struct event* libevent_handle;
|
|
||||||
|
|
||||||
static void eq_callback(void* callback_data, struct event_data* event_data)
|
static void eq_callback(void* callback_data, struct event_data* event_data)
|
||||||
{
|
{
|
||||||
@ -17,8 +16,6 @@ EXO_TEST(eventqueue_init_1, {
|
|||||||
|
|
||||||
EXO_TEST(eventqueue_init_2, {
|
EXO_TEST(eventqueue_init_2, {
|
||||||
/* hack */
|
/* hack */
|
||||||
libevent_handle = eq->event;
|
|
||||||
eq->event = 0;
|
|
||||||
return eq->callback_data == &eq_val && eq->callback == eq_callback && eq->q1 && eq->q2 && !eq->locked;
|
return eq->callback_data == &eq_val && eq->callback == eq_callback && eq->q1 && eq->q2 && !eq->locked;
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -81,7 +78,6 @@ EXO_TEST(eventqueue_size_4, {
|
|||||||
});
|
});
|
||||||
|
|
||||||
EXO_TEST(eventqueue_shutdown_1, {
|
EXO_TEST(eventqueue_shutdown_1, {
|
||||||
eq->event = libevent_handle;
|
|
||||||
event_queue_shutdown(eq);
|
event_queue_shutdown(eq);
|
||||||
return 1;
|
return 1;
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user