diff options
author | U. Artie Eoff <ullysses.a.eoff@intel.com> | 2014-01-10 12:55:25 -0800 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2014-01-15 10:46:08 -0800 |
commit | 5e096ccc947ca46cd23a6b0e72e13452fccc81f8 (patch) | |
tree | 5c22da223eedddd98831689dc4af74d6e831d447 /tests | |
parent | 3a1be1e6fea34fa87f9329d7bf06bd40340f754f (diff) |
event-loop-test: assert non-NULL results
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/event-loop-test.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/event-loop-test.c b/tests/event-loop-test.c index cba46d4..f250ed0 100644 --- a/tests/event-loop-test.c +++ b/tests/event-loop-test.c @@ -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); |