Condition Coverage

blib/lib/Test2/API.pm
Criterion Covered Total %
condition 72 125 57.6


and 2 conditions

line l !l condition
424 0 5023 ($!, $@, $?, $^E) = ($errno, $eval_error, $child_error, $extended_error) and return bless({%$current, '_is_canon', undef, 'errno', $errno, 'eval_error', $eval_error, 'child_error', $child_error, '_is_spawn', [$pkg, $file, $line, $sub]}, 'Test2::API::Context')

and 3 conditions

line !l l&&!r l&&r condition
62 0 0 0 $init and $load
289 249 0 18 $ENV{'T2_FORMATTER'} and $ENV{'T2_FORMATTER'} =~ /^(\+)?(.*)$/
382 13357 0 0 not $hub || exists $params{'hub'} and @$stack
410 0 514 613 $level >= 0 and not $pkg
414 53 4995 29760 not $end_phase and !$current || $depth <= $current->{'_depth'} + $params{'wrapped'}
4995 8308 21452 not $end_phase and !$current || $depth <= $current->{'_depth'} + $params{'wrapped'} and caller $depth + 1
418 8330 5025 1 $current and $params{'on_release'}
5025 0 1 $current and $params{'on_release'} and $depth_ok
424 8330 3 5023 $current and $depth_ok
611 54 1 0 not $ok and $err =~ /Label not found for "last T2_SUBTEST_WRAPPER"/
55 0 0 &blessed($err) and $err->isa('Test2::Hub::Interceptor::Terminator')
626 0 59 3 $ok and not $hub->no_ending
59 1 2 $ok and not $hub->no_ending and not $hub->ended
690 117 1 0 not $ok and $err =~ /Label not found for "last T2_SUBTEST_WRAPPER"/
118 0 0 &blessed($err) and &blessed($err) eq 'Test::Builder::Exception'
722 0 2 0 $bailed and not $buffered
0 0 2 $bailed and $buffered
735 0 0 119 $ok and not $hub->no_ending
0 0 119 $ok and not $hub->no_ending and not $hub->ended
740 0 12 107 $ok && $hub->is_passing
759 9 109 1 defined $plan_ok and not $plan_ok
762 117 0 2 $bailed and $buffered

or 2 conditions

line l !l condition
8 0 246 $ENV{'TEST_ACTIVE'} ||= 1
403 13357 0 ${^GLOBAL_PHASE} || 'NA'
419 1 0 $current->{'_on_release'} ||= []

or 3 conditions

line l !l&&r !l&&!r condition
76 246 0 0 $] ge '5.014' or $ENV{'T2_CHECK_DEPTH'}
0 0 0 $] ge '5.014' or $ENV{'T2_CHECK_DEPTH'} or $Test2::API::DO_DEPTH_CHECK
183 353 0 0 $STDOUT ||= clone_io(\*STDOUT)
184 353 0 0 $STDERR ||= clone_io(\*STDERR)
346 2 1 0 $hid ||= $STACK->top->hid
376 10723 2634 0 $params{'stack'} || $STACK
377 1007 12350 0 $params{'hub'} || (@$stack ? $stack->[-1] : $stack->top)
382 13357 0 0 $hub || exists $params{'hub'}
404 53 0 13304 $ENDING || $phase eq 'END' || $phase eq 'DESTRUCT'
408 12842 0 515 $pkg or $end_phase
414 21007 8753 4995 !$current || $depth <= $current->{'_depth'} + $params{'wrapped'}
416 8358 4995 3 $end_phase || !$current || $current->{'_depth'} < $depth
611 0 0 55 not $ok and $err =~ /Label not found for "last T2_SUBTEST_WRAPPER"/ or &blessed($err) and $err->isa('Test2::Hub::Interceptor::Terminator')
649 104 1 16 $params->{'buffered'} || $parent->{'buffered'}
653 121 0 0 $ctx->stack || $STACK
690 0 0 118 not $ok and $err =~ /Label not found for "last T2_SUBTEST_WRAPPER"/ or &blessed($err) and &blessed($err) eq 'Test::Builder::Exception'
699 118 0 0 $parent->is_local || $parent->ipc