Commit 5e096ccc authored by U. Artie Eoff's avatar U. Artie Eoff Committed by Kristian Høgsberg

event-loop-test: assert non-NULL results

Signed-off-by: U. Artie Eoff's avatarU. Artie Eoff <ullysses.a.eoff@intel.com>
parent 3a1be1e6
......@@ -48,10 +48,12 @@ TEST(event_loop_post_dispatch_check)
int dispatch_ran = 0;
int p[2];
assert(loop);
assert(pipe(p) == 0);
source = wl_event_loop_add_fd(loop, p[0], WL_EVENT_READABLE,
fd_dispatch, &dispatch_ran);
assert(source);
wl_event_source_check(source);
wl_event_loop_dispatch(loop, 0);
......@@ -105,6 +107,8 @@ TEST(event_loop_free_source_with_data)
* run (and that we don't crash, of course).
*/
assert(loop);
context.count = 0;
assert(pipe(context.p1) == 0);
assert(pipe(context.p2) == 0);
......@@ -184,6 +188,7 @@ TEST(event_loop_timer)
int got_it = 0;
source = wl_event_loop_add_timer(loop, timer_callback, &got_it);
assert(source);
wl_event_source_timer_update(source, 10);
wl_event_loop_dispatch(loop, 0);
assert(!got_it);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment