Branch Coverage

deps/libzmqraw/timers.c
Criterion Covered Total %
branch 59 102 57.8


line true false branch
51 3 0 (timers->timers = zmq_timers_new()) == NULL ||
52 3 0 (timers->wakeup_context = zmq_ctx_new()) == NULL ||
53 3 0 (timers->wakeup_send = zmq_socket (timers->wakeup_context, ZMQ_PAIR)) == NULL ||
57 3 0 if ((rc = zmq_bind (timers->wakeup_recv, "inproc://_wakeup")) < 0 ||
3 0 if ((rc = zmq_bind (timers->wakeup_recv, "inproc://_wakeup")) < 0 ||
80 0 3 assert (timers);
81 0 3 assert (timers->timer_count == 0);
88 3 0 if (timers->thread)
108 0 24 assert (context);
113 24 0 (timer->send = zmq_socket (context, ZMQ_PAIR)) == NULL ||
123 24 0 if ((rc = zmq_bind (timer->recv, endpoint)) < 0 ||
24 0 if ((rc = zmq_bind (timer->recv, endpoint)) < 0 ||
124 24 0 (rc = zmq_setsockopt (timer->recv, ZMQ_CONFLATE, &v, sizeof (v))) < 0 ||
142 0 24 assert (timer);
143 0 24 assert (timer->send);
147 24 0 if (timer->recv && !timer->recv_sv)
0 24 if (timer->recv && !timer->recv_sv)
160 0 27 assert (timer);
161 0 27 assert (timer->timers);
168 3 24 if (!timers->running)
186 0 24 assert (timers);
187 0 24 assert (context);
192 0 24 if (timer == NULL)
209 0 27 assert (timer);
212 24 3 if (timer->running)
217 0 27 while (zmq_recv (timer->recv, NULL, 0, ZMQ_DONTWAIT) == 0);
223 0 52 assert (timer);
225 27 25 if (timer->running)
238 1 0 if (timer->running)
253 0 1 assert (timer);
262 0 38 assert (timer);
271 0 24 assert (timer);
279 0 1 assert (timer);
285 0 24 assert (timer);
291 0 124 assert (timer);
297 0 24 assert (timer);
298 0 24 assert (sv);
299 0 24 assert (timer->recv_sv == NULL);
311 0 6 assert (timer);
312 0 6 assert (interval > 0);
322 0 8 assert (timer);
337 109 3 while (running)
342 0 109 while (zmq_recv (timers->wakeup_recv, NULL, 0, ZMQ_DONTWAIT) == 0);
348 79 109 while (--timers->run_count >= 0)
353 13 66 if (timer->interval == 0)
360 79 30 if (timers->last)
369 106 3 if (running)
376 0 80 assert (arg);
381 0 80 assert (timer->id == timer_id);
388 80 0 if (index == 0)
393 0 80 assert (timers->last);