Branch Coverage

blib/lib/Test/Mock/Time.pm
Criterion Covered Total %
branch 98 172 56.9


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'}) { }
100 0 20 $after < 0 ? :
0 20 $repeat < 0 ? :
109 13 7 if ($watcher)
118 4 0 if $_->{'watcher'}
119 2 0 if ($timer)
120 4 0 unless not $_->{'watcher'}
128 6 0 if $_->{'watcher'}
129 6 7 if ($timer)
130 6 0 unless not $_->{'watcher'}
142 0 12 defined $_[0] ? :
146 9 4 defined $_[0] ? :
151 2 14 if $dur < 0
171 2 2 wantarray ? :
175 1 50 if ($which == CLOCK_REALTIME()) { }
49 1 elsif ($which == CLOCK_MONOTONIC()) { }
185 2 1 if ($which == CLOCK_REALTIME() or $which == CLOCK_MONOTONIC())
192 1 2 unless @_
193 1 1 if $seconds < 0
200 1 9 if $useconds < 0
207 1 1 if $nanoseconds < 0
214 1 4 if $nanoseconds < 0
215 1 3 if $which != CLOCK_REALTIME() and $which != CLOCK_MONOTONIC()
216 1 2 if $flags
240 1 3 if ($seconds < 0)
251 15 8 if (@Timers)
256 15 0 unless ($tick++ and $flags)
260 7 8 if (not @Timers) { }
8 0 elsif ($k and $flags || &any(sub {
268 2 0 if $_->{'watcher'}
0 15 unless ($flags or &any(sub {
280 18 5 if ($flags and $flags == &EV::RUN_ONCE())
289 13 0 if $weakw
299 0 2 if $reschedule_cb
300 0 2 $at < 0 ? :
301 0 2 $repeat < 0 ? :
303 1 1 if ($repeat > 0 and $at < $now)
308 2 0 $at > $now ? :
312 2 0 if $weakw
322 2 0 if $_->{'watcher'}
323 2 0 if $_->{'watcher'}
324 1 1 if ($active) { }
1 0 elsif ($inactive) { }
334 18 0 unless not $_->{'watcher'}
335 11 0 unless not $_->{'watcher'}
346 0 0 unless (defined $repeat)
349 0 0 if $_->{'watcher'}
350 0 0 if ($timer)
352 0 0 $after < 0 ? :
353 0 0 $repeat < 0 ? :
359 0 0 if $_->{'watcher'}
360 0 0 if ($timer)
367 0 3 if (defined $repeat and $repeat < 0)
370 2 0 if $_->{'watcher'}
371 2 0 if $_->{'watcher'}
372 2 1 if ($active) { }
1 0 elsif ($inactive) { }
373 0 2 defined $repeat ? :
374 2 0 if ($active->{'repeat'} > 0) { }
383 0 1 defined $repeat ? :
384 1 0 if ($inactive->{'repeat'} > 0)
394 1 0 unless not $_->{'watcher'}
395 2 0 unless not $_->{'watcher'}
406 0 0 if $reschedule_cb
407 0 0 $at < 0 ? :
408 0 0 $repeat < 0 ? :
410 0 0 if ($repeat > 0 and $at < $now)
415 0 0 $at > $now ? :
417 0 0 if $_->{'watcher'}
418 0 0 if ($timer)
430 0 0 if $_->{'watcher'}
431 0 0 if ($timer)
443 2 8 unless (@Timers)
455 0 5 if ($delay == 0)
466 0 2 if (not $id =~ /\Afake_\d+\z/ms) { }
471 2 0 if ($timer)
479 10 2 if (not $id =~ /\Afake_\d+\z/ms) { }
483 2 0 unless $_->{'loop'} ne $self