Branch Coverage

blib/lib/Test2/API.pm
Criterion Covered Total %
branch 74 94 78.7


line true false branch
10 0 175 @_ ? :
23 0 56 unless eval 'END { test2_set_is_end() }; 1'
28 57 0 if ($] ge '5.014' or $ENV{'T2_CHECK_DEPTH'} or $Test2::API::DO_DEPTH_CHECK) { }
135 2 3 if @_
167 1 1 unless $formatter
168 1 0 if $INST->formatter_set
191 1 2 defined $want ? :
1 3 $want ? :
200 1 3 unless $ok
202 1 2 if $want
203 1 1 if defined $want
219 0 3 unless $ok
233 57 1144 unless $INST->{'loaded'}
235 1 1200 unless defined wantarray
239 1144 56 $params{'hub'} || @$stack ? :
244 72 1128 if $hub->{'_context_acquire'}
252 1 1199 $end_phase ? :
253 2 1198 unless ($pkg or $end_phase)
254 1 1 unless $params{'fudge'}
263 1 91 if ($current and $params{'on_release'} and $depth_ok)
269 90 1109 if $current and $depth_ok
282 2 1107 if ($current)
283 2 0 unless (${$current->{'_aborted'};})
285 0 2 unless $current->{'_is_canon'}
287 2 0 unless $depth_ok
291 2 0 if $current->{'_is_canon'}
321 2 1107 $params{'on_release'} ? :
330 37 1072 if $hub->{'_context_init'}
332 2 1107 if $params{'on_init'}
395 10 3 if (my $global_ipc = test2_ipc())
424 1 2 unless $ok or &blessed($err) and $err->isa('Test2::Hub::Interceptor::Terminator')
427 1 9 if $ok and not $hub->no_ending and not $hub->ended
438 41 0 unless ref $params
443 4 37 unless $buffered
454 0 41 $parent->isa('Test2::Hub::Subtest') ? :
457 37 4 if ($buffered)
458 35 2 if (my $format = $hub->format)
459 34 1 $format->can('hide_buffered') ? :
460 34 1 if $hide
471 0 40 if (not $ok and $err =~ /Label not found for "last T2_SUBTEST_WRAPPER"/) { }
483 0 40 unless ($finished)
484 0 0 if (my $bailed = $hub->bailed_out)
489 0 0 if $code
492 40 0 if $ok and not $hub->no_ending and not $hub->ended
511 8 32 unless $e->pass
513 0 40 unless $ok
515 0 40 if defined $plan_ok and not $plan_ok