Branch Coverage

blib/lib/Test2/API.pm
Criterion Covered Total %
branch 73 92 79.3


line true false branch
21 0 53 unless eval 'END { _set_is_end() }; 1'
26 54 0 if ($] ge '5.014' or $ENV{'T2_CHECK_DEPTH'} or $Test2::API::DO_DEPTH_CHECK) { }
130 2 3 if @_
162 1 1 unless $formatter
163 1 0 if $INST->formatter_set
186 1 2 defined $want ? :
1 3 $want ? :
195 1 3 unless $ok
197 1 2 if $want
198 1 1 if defined $want
214 0 3 unless $ok
228 54 1119 unless $INST->{'loaded'}
230 1 1172 unless defined wantarray
234 1119 53 $params{'hub'} || @$stack ? :
239 72 1100 if $hub->{'_context_acquire'}
247 1 1171 $end_phase ? :
248 2 1170 unless ($pkg or $end_phase)
249 1 1 unless $params{'fudge'}
258 1 90 if ($current and $params{'on_release'} and $depth_ok)
264 89 1082 if $current and $depth_ok
277 2 1080 if ($current)
278 2 0 unless (${$current->{'_aborted'};})
280 0 2 unless $current->{'_is_canon'}
282 2 0 unless $depth_ok
286 2 0 if $current->{'_is_canon'}
316 2 1080 $params{'on_release'} ? :
325 37 1045 if $hub->{'_context_init'}
327 2 1080 if $params{'on_init'}
390 10 3 if (my $global_ipc = test2_ipc())
419 1 2 unless $ok or &blessed($err) and $err->isa('Test2::Hub::Interceptor::Terminator')
422 1 9 if $ok and not $hub->no_ending and not $hub->ended
433 40 0 unless ref $params
438 4 36 unless $buffered
449 0 40 $parent->isa('Test2::Hub::Subtest') ? :
452 36 4 if ($buffered)
453 34 2 if (my $format = $hub->format)
454 33 1 $format->can('hide_buffered') ? :
455 33 1 if $hide
466 0 39 if (not $ok and $err =~ /Label not found for "last T2_SUBTEST_WRAPPER"/) { }
478 0 39 unless ($finished)
479 0 0 if (my $bailed = $hub->bailed_out)
484 0 0 if $code
487 39 0 if $ok and not $hub->no_ending and not $hub->ended
506 8 31 unless $e->pass
508 0 39 unless $ok
510 0 39 if defined $plan_ok and not $plan_ok