Branch Coverage

blib/lib/Test/Mock/Time.pm
Criterion Covered Total %
branch 100 172 58.1


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 8 unless ($tick++ and $flags)
260 7 16 if (not @Timers) { }
8 8 elsif ($k and $flags || &any(sub { $_->{'watcher'}->keepalive if $_->{'watcher'}; } , @Timers)) { }
268 2 0 if $_->{'watcher'}
0 15 unless ($flags or &any(sub { $_->{'watcher'}->keepalive if $_->{'watcher'}; } , @Timers))
280 18 5 if ($flags and $flags == &EV::RUN_ONCE())
289 13 0 if $weakw
300 0 2 if $reschedule_cb
301 0 2 $at < 0 ? :
302 0 2 $repeat < 0 ? :
304 1 1 if ($repeat > 0 and $at < $now)
309 2 0 $at > $now ? :
313 2 0 if $weakw
324 2 0 if $_->{'watcher'}
325 2 0 if $_->{'watcher'}
326 1 1 if ($active) { }
1 0 elsif ($inactive) { }
336 18 0 unless not $_->{'watcher'}
337 11 0 unless not $_->{'watcher'}
348 0 0 unless (defined $repeat)
351 0 0 if $_->{'watcher'}
352 0 0 if ($timer)
354 0 0 $after < 0 ? :
355 0 0 $repeat < 0 ? :
361 0 0 if $_->{'watcher'}
362 0 0 if ($timer)
369 0 3 if (defined $repeat and $repeat < 0)
372 2 0 if $_->{'watcher'}
373 2 0 if $_->{'watcher'}
374 2 1 if ($active) { }
1 0 elsif ($inactive) { }
375 0 2 defined $repeat ? :
376 2 0 if ($active->{'repeat'} > 0) { }
385 0 1 defined $repeat ? :
386 1 0 if ($inactive->{'repeat'} > 0)
396 1 0 unless not $_->{'watcher'}
397 2 0 unless not $_->{'watcher'}
408 0 0 if $reschedule_cb
409 0 0 $at < 0 ? :
410 0 0 $repeat < 0 ? :
412 0 0 if ($repeat > 0 and $at < $now)
417 0 0 $at > $now ? :
419 0 0 if $_->{'watcher'}
420 0 0 if ($timer)
432 0 0 if $_->{'watcher'}
433 0 0 if ($timer)
445 2 8 unless (@Timers)
457 0 5 if ($delay == 0)
468 0 2 if (not $id =~ /\Afake_\d+\z/ms) { }
473 2 0 if ($timer)
481 10 2 if (not $id =~ /\Afake_\d+\z/ms) { }
485 2 0 unless $_->{'loop'} ne $self