Branch Coverage

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


line true false branch
9 0 175 @_ ? :
22 0 56 unless eval 'END { test2_set_is_end() }; 1'
27 57 0 if ($] ge '5.014' or $ENV{'T2_CHECK_DEPTH'} or $Test2::API::DO_DEPTH_CHECK) { }
134 2 3 if @_
166 1 1 unless $formatter
167 1 0 if $INST->formatter_set
190 1 2 defined $want ? :
1 3 $want ? :
199 1 3 unless $ok
201 1 2 if $want
202 1 1 if defined $want
218 0 3 unless $ok
232 57 1141 unless $INST->{'loaded'}
234 1 1197 unless defined wantarray
238 1141 56 $params{'hub'} || @$stack ? :
243 72 1125 if $hub->{'_context_acquire'}
251 1 1196 $end_phase ? :
252 2 1195 unless ($pkg or $end_phase)
253 1 1 unless $params{'fudge'}
262 1 91 if ($current and $params{'on_release'} and $depth_ok)
268 90 1106 if $current and $depth_ok
281 2 1104 if ($current)
282 2 0 unless (${$current->{'_aborted'};})
284 0 2 unless $current->{'_is_canon'}
286 2 0 unless $depth_ok
290 2 0 if $current->{'_is_canon'}
320 2 1104 $params{'on_release'} ? :
329 37 1069 if $hub->{'_context_init'}
331 2 1104 if $params{'on_init'}
394 10 3 if (my $global_ipc = test2_ipc())
423 1 2 unless $ok or &blessed($err) and $err->isa('Test2::Hub::Interceptor::Terminator')
426 1 9 if $ok and not $hub->no_ending and not $hub->ended
437 41 0 unless ref $params
442 4 37 unless $buffered
453 0 41 $parent->isa('Test2::Hub::Subtest') ? :
456 37 4 if ($buffered)
457 35 2 if (my $format = $hub->format)
458 34 1 $format->can('hide_buffered') ? :
459 34 1 if $hide
470 0 40 if (not $ok and $err =~ /Label not found for "last T2_SUBTEST_WRAPPER"/) { }
482 0 40 unless ($finished)
483 0 0 if (my $bailed = $hub->bailed_out)
488 0 0 if $code
491 40 0 if $ok and not $hub->no_ending and not $hub->ended
510 8 32 unless $e->pass
512 0 40 unless $ok
514 0 40 if defined $plan_ok and not $plan_ok