Branch Coverage

blib/lib/Test/Mock/Time.pm
Criterion Covered Total %
branch 93 162 57.4


line true false branch
56 0 0 unless $Test::Mock::Time::a->{'start'} + $Test::Mock::Time::a->{'after'} <=> $Test::Mock::Time::b->{'start'} + $Test::Mock::Time::b->{'after'}
57 35 16 @Timers ? :
60 23 28 unless (defined $dur)
61 23 0 $next_at > $Relative ? :
64 0 51 if $dur < 0
66 28 23 if ($next_at == 0 or $next_at > $Relative + $dur)
72 23 0 if ($next_at > $Relative)
78 7 16 if ($Timers[0]{'repeat'} == 0) { }
79 3 4 if ($Timers[0]{'watcher'}) { }
99 0 20 $after < 0 ? :
0 20 $repeat < 0 ? :
108 13 7 if ($watcher)
116 4 0 if $_->{'watcher'}
117 2 0 if ($timer)
118 4 0 unless not $_->{'watcher'}
126 6 0 if $_->{'watcher'}
127 6 7 if ($timer)
128 6 0 unless not $_->{'watcher'}
149 2 14 if $dur < 0
169 2 2 wantarray ? :
173 1 50 if ($which == CLOCK_REALTIME()) { }
49 1 elsif ($which == CLOCK_MONOTONIC()) { }
183 2 1 if ($which == CLOCK_REALTIME() or $which == CLOCK_MONOTONIC())
190 1 2 unless @_
191 1 1 if $seconds < 0
198 1 9 if $useconds < 0
205 1 1 if $nanoseconds < 0
212 1 4 if $nanoseconds < 0
213 1 3 if $which != CLOCK_REALTIME() and $which != CLOCK_MONOTONIC()
214 1 2 if $flags
238 1 3 if ($seconds < 0)
249 15 8 if (@Timers)
254 15 0 unless ($tick++ and $flags)
258 7 8 if (not @Timers) { }
8 0 elsif ($k and $flags || &any(sub { $_->{'watcher'}->keepalive if $_->{'watcher'}; } , @Timers)) { }
266 2 0 if $_->{'watcher'}
0 15 unless ($flags or &any(sub { $_->{'watcher'}->keepalive if $_->{'watcher'}; } , @Timers))
278 18 5 if ($flags and $flags == &EV::RUN_ONCE())
287 13 0 if $weakw
297 0 2 if $reschedule_cb
298 0 2 $at < 0 ? :
299 0 2 $repeat < 0 ? :
301 1 1 if ($repeat > 0 and $at < $now)
306 2 0 $at > $now ? :
310 2 0 if $weakw
320 2 0 if $_->{'watcher'}
321 2 0 if $_->{'watcher'}
322 1 1 if ($active) { }
1 0 elsif ($inactive) { }
332 18 0 unless not $_->{'watcher'}
333 11 0 unless not $_->{'watcher'}
345 0 0 if $_->{'watcher'}
346 0 0 if ($timer)
348 0 0 $after < 0 ? :
349 0 0 $repeat < 0 ? :
355 0 0 if $_->{'watcher'}
356 0 0 if ($timer)
363 0 3 if (defined $repeat and $repeat < 0)
366 2 0 if $_->{'watcher'}
367 2 0 if $_->{'watcher'}
368 2 1 if ($active) { }
1 0 elsif ($inactive) { }
370 2 0 if ($active->{'repeat'} > 0) { }
380 1 0 if ($inactive->{'repeat'} > 0)
390 1 0 unless not $_->{'watcher'}
391 2 0 unless not $_->{'watcher'}
402 0 0 if $reschedule_cb
403 0 0 $at < 0 ? :
404 0 0 $repeat < 0 ? :
406 0 0 if ($repeat > 0 and $at < $now)
411 0 0 $at > $now ? :
413 0 0 if $_->{'watcher'}
414 0 0 if ($timer)
426 0 0 if $_->{'watcher'}
427 0 0 if ($timer)
439 2 8 unless (@Timers)
451 0 5 if ($delay == 0)
462 0 2 if (not $id =~ /\Afake_\d+\z/ms) { }
467 2 0 if ($timer)
475 10 2 if (not $id =~ /\Afake_\d+\z/ms) { }
479 2 0 unless $_->{'loop'} ne $self