Condition Coverage

blib/lib/Test/Builder.pm
Criterion Covered Total %
condition 169 252 67.0


and 3 conditions

line !l l&&!r l&&r condition
65 1177 278 2961 $epkg and not $todo
292 0 56 91 $ok and $chub->count
56 1 90 $ok and $chub->count and not $chub->no_ending
57 3 87 $ok and $chub->count and not $chub->no_ending and not $chub->ended
304 56 79 12 $count and $num_extra != 0
321 134 13 0 not $passed || $failed and $count
147 0 0 not $passed || $failed and $count and not $num_extra
331 30 115 2 $plan and $plan eq 'SKIP'
354 2 0 140 $code and &reftype($code) eq 'CODE'
378 134 1 0 not $ok and $err =~ /Label not found for "last T2_SUBTEST_WRAPPER"/
135 0 0 &blessed($err) and &blessed($err) eq 'Test::Builder::Exception'
387 139 0 0 $start_pid != $$ and not $INC{'Test2/IPC.pm'}
409 85 3 49 not $count and !defined($plan) || "$plan" ne 'SKIP'
470 1 0 208 $format and $format->isa('Test2::Formatter::TAP')
601 14 33 0 $count and defined $num_tests
47 0 0 $count and defined $num_tests and $count != $num_tests
611 46 18 2 $self->expected_tests and $num_tests != $self->expected_tests
616 45 20 1 $ctx->hub->plan and $ctx->hub->plan eq 'NO PLAN'
631 2 5 4 $plan and not $plan =~ /\D/
632 2 0 5 $plan and $plan eq 'NO PLAN'
649 0 0 0 @call and $call[0]
655 0 0 0 $begin and $ctx->hub->meta('Test::Builder', {})->{'parent'}
687 2075 40 1 0 + $name and $name =~ /^[\d\s]+$/
797 2 21 0 $numval != 0 && ($numval ne $val ? 1 : 0)
808 11 2 493 defined $got and defined $expect
827 1 0 64 defined $got and defined $expect
893 4 0 7 defined $got and defined $dont_expect
911 0 1 1 defined $got and defined $dont_expect
1001 0 4 2 ($got eq $expect || $got == $expect) && ((defined $got xor defined $expect) || length $got != length $expect)
1042 0 0 319 defined $file and defined $line
1222 3 0 218 $format and $format->can('no_numbers')
3 0 218 $format and $format->can('no_numbers') and $format->can('set_no_numbers')
1240 1 0 60 $format and $format->can($set)
1331 0 0 491 $format and $format->isa('Test2::Formatter::TAP')
1345 0 0 484 $format and $format->isa('Test2::Formatter::TAP')
1359 0 0 482 $format and $format->isa('Test::Builder::Formatter')
1412 2 0 219 $format and $format->isa('Test2::Formatter::TAP')
1533 22 2 5 $meta and @$meta
1552 253 61 164 $meta and @$meta
1579 171 88 176 $hub == $active_hub and $e->isa('Test2::Event::Ok')
1641 77 468 1 $error and $opts{'die_on_fail'}
1673 145 0 1 not $hub->plan and $hub->count
1695 144 0 1 $real_exit_code and not $count
1701 0 136 8 $plan and "$plan" eq 'SKIP'
1742 134 0 1 not $passed || $failed and $count
134 1 0 not $passed || $failed and $count and not $num_extra

or 2 conditions

line l !l condition
82 26 105 $result->{'type'} ||= 'todo'
274 147 0 $self->{'Hub'} || (return $st_ctx->release)
298 117 30 $chub->plan || 0
642 10 2 $reason || 1
762 45 457 &blessed($$thing) or scalar $self->_try(sub { $$thing->isa('UNIVERSAL'); } )
767 8 37 overload::Method($$thing, $type) || (return)
1066 31 0 $why ||= ''
1093 6 0 $why ||= ''
1554 314 0 $ctx->trace->package || (return 0)
1585 4 172 $result->{'type'} ||= 'todo'
1691 0 1 $$new ||= 254
1705 0 1 $$new ||= 255

or 3 conditions

line l !l&&r !l&&!r condition
21 2 0 160 Test2::API::test2_init_done() or Test2::API::test2_load_done()
81 26 103 2 $result->{'reason'} ||= $todo
145 157 0 0 not $Test::Builder::Test->{'Original_Pid'} or $Test::Builder::Test->{'Original_Pid'} == 0
201 147 1 0 $self->{'Hub'} || $ctx->hub
219 146 5 0 $name ||= 'Child of ' . $self->name
321 73 61 13 $passed || $failed
357 140 0 0 $name ||= 'Child of ' . $self->name
378 0 0 135 not $ok and $err =~ /Label not found for "last T2_SUBTEST_WRAPPER"/ or &blessed($err) and &blessed($err) eq 'Test::Builder::Exception'
409 13 37 2 !defined($plan) || "$plan" ne 'SKIP'
467 8 209 0 $self->{'Orig_Handles'} ||= do { my $format = $ctx->hub->format; my $out; if ($format and $format->isa('Test2::Formatter::TAP')) { $out = $format->handles; } ; $out ? [@$out] : [] }
602 16 1 2 not $plan or $plan eq 'NO PLAN'
810 2 2 9 defined $got || defined $expect
829 0 0 1 defined $got || defined $expect
845 32 3 11 $type eq 'eq' or $type eq 'ne'
895 0 3 1 defined $got || defined $dont_expect
913 1 0 0 defined $got || defined $dont_expect
1122 21 1 2 ($re, $opts) = $regex =~ m[^ /(.*)/ (\w*) $ ]sx or (undef, $re, $opts) = $regex =~ /^ m([^\w\s]) (.+) \1 (\w*) $/sx
1203 7 0 173 eval { do { $maybe_fh->isa('IO::Handle') } } || eval { do { tied($maybe_fh)->can('TIEHANDLE') } }
1513 154 0 0 $ctx->trace->package || $self->exported_to
144 154 0 $pack ||= $ctx->trace->package || $self->exported_to
1535 0 24 0 $pack ||= $ctx->trace->package
1584 4 75 97 $result->{'reason'} ||= $message
1670 145 1 3 $plan or $count
146 0 3 $plan or $count or $failed
1680 0 0 0 $$new ||= $real_exit_code
1687 0 0 0 $$new ||= $exit_code
1697 1 0 0 $$new ||= $real_exit_code
1713 0 0 0 $$new ||= $real_exit_code
1742 127 7 1 $passed || $failed
1759 0 8 127 $$new ||= $exit_code