Branch Coverage

blib/lib/Assert/Refute/Report.pm
Criterion Covered Total %
branch 123 132 93.1


line true false branch
99 1 16 if @_ % 2
104 1 15 if @extra
106 0 15 unless %args
110 0 15 if $self->{'done'}
113 1 14 if defined $self->{'plan_tests'}
115 1 13 if $self->{'count'} > 0
117 1 12 if ($args{'skip_all'}) { }
11 1 elsif (defined $args{'tests'}) { }
123 1 10 unless $args{'tests'} =~ /^[0-9]+$/
128 2 10 if ($args{'title'})
150 1 287 if $self->{'done'}
153 191 96 if defined $msg
158 176 111 unless $cond
219 8 130 if ($exception) { }
4 126 elsif ($self->{'done'}) { }
225 1 3 if defined $exception
232 8 126 if ($self->{'has_error'})
236 10 124 if (defined $self->{'plan_tests'})
238 3 7 if ($self->{'count'} != $self->{'plan_tests'})
246 65 69 if ($self->{'fail_count'})
283 1 2 unless ref $hash eq 'HASH'
306 1 7 if $self->{'done'}
368 0 32 if $self->{'done'}
369 1 31 if not $msg or ref $msg
374 4 27 if (&blessed($sub) and $sub->isa('Assert::Refute::Contract')) { }
4 23 elsif (&blessed($sub) and $sub->isa('Assert::Refute::Report')) { }
22 1 elsif (UNIVERSAL::isa($sub, 'CODE')) { }
377 1 3 if @args
379 1 2 unless $sub->is_done
390 1 21 unless (eval { do { local $Assert::Refute::DRIVER = $rep; &$sub($rep, @args); $rep->done_testing(0); 1 } })
400 1 27 if $rethrow
472 0 1 unless $self->{'fail'}
487 1 2 if exists $self->{'fail'}{$n}
489 1 1 if $n =~ /^[1-9]\d*$/ and $n <= $self->{'count'}
532 0 39 unless defined $n and $n =~ /^(?:[0-9]+|-1)$/
537 9 30 if (my $array = $self->{'messages'}{$n})
543 33 6 if ($n >= 1) { }
548 4 29 if (ref $reason eq 'ARRAY') { }
5 42 elsif ($reason and $reason ne 1) { }
621 0 358 if $level > $verbosity
626 295 63 exists $padding{$level} ? :
640 1 62 if $level > 0
641 21 41 if $level == -1
683 68 99 if ($self->{'fail'}{$_}) { }
684 33 35 if $streak
691 25 32 if $streak
693 45 7 $self->{'done'} ? :
5 52 $self->get_error ? :
767 2 91 if $self->{'done'}
788 0 71 unless defined $verbosity
793 9 62 if (defined $self->{'plan_tests'})
795 9 0 unless $verbosity < 0
802 154 142 if ($n > 0)
804 77 77 $reason ? :
805 76 78 $self->{'name'}{$n} ? :
808 4 150 if ($self->{'subcontract'}{$n})
814 7 147 if (ref $reason eq 'ARRAY') { }
54 170 elsif ($reason and $reason ne 1) { }
824 78 218 if (my $rest = $self->{'messages'}{$n})
829 57 5 if (not defined $self->{'plan_tests'} and $self->{'done'})
830 57 0 unless $verbosity < 0
841 1 65 if defined $skip
870 25 2 if (&blessed($parent)) { }
1 1 elsif (not defined $parent) { }
910 3 1 unless (exists $self->{'depth'})
912 2 1 $parent ? :