Branch Coverage

lib/Test/Conditions.pm
Criterion Covered Total %
branch 95 138 68.8


line true false branch
40 0 16 if defined $dummy
71 1 4 if (ref $condition and &reftype($condition) eq 'HASH') { }
73 0 1 if defined $limit and $limit ne ''
78 0 2 unless $key ne '' and not $key =~ /^\d+$/
80 0 2 unless defined $condition->{$key} and $condition->{$key} =~ /^\d+$/
82 0 2 if ($key eq 'DEFAULT') { }
99 0 4 unless defined $condition and $condition ne '' and not $condition =~ /^\d+$/
100 0 4 unless defined $limit and $limit =~ /^\d+$/
102 0 4 if ($condition eq 'DEFAULT') { }
124 13 31 if defined $key and defined $tc->{'max'}{$key}
143 1 12 if (ref $condition and &reftype($condition) eq 'HASH') { }
145 0 1 if defined $limit and $limit ne ''
150 0 2 unless $key ne '' and not $key =~ /^\d+$/
152 0 2 unless defined $condition->{$key} and $condition->{$key} =~ /^\d+$/
163 0 12 unless defined $condition and $condition ne '' and not $condition =~ /^\d+$/
164 0 12 unless defined $limit and $limit =~ /^\d+$/
194 0 8 unless defined $key and $key ne ''
212 35 15 if defined $key and defined $tc->{'expect'}{$key}
225 0 84 unless defined $key and $key ne ''
230 8 76 if ($tc->{'tested'}{$key})
252 0 9 unless defined $key and $key ne ''
256 0 9 if ($tc->{'tested'}{$key})
284 0 70 unless defined $key and $key ne ''
292 17 43 if not defined $tc->{'label'}{$key} and defined $label and $label ne ''
309 0 9 unless defined $key and $key ne ''
314 9 0 if (defined $tc->{'count'}{$key} and $tc->{'count'}{$key} > 0)
318 5 4 unless ($tc->{'count'}{$key})
327 1 2 if (defined $tc->{'label'}{$key} and defined $label and $tc->{'label'}{$key} eq $label)
342 1 35 unless ref $tc->{'set'} eq 'HASH'
343 58 5 if not $tc->{'tested'}{$_}
355 0 35 unless ref $tc->{'expect'} eq 'HASH'
368 0 2 unless ref $tc->{'set'} eq 'HASH'
418 13 37 defined $tc->{'label'}{$key} ? :
437 0 33 unless $message
465 23 12 if ($expected and $limit == 0 || $count <= $limit) { }
4 8 elsif ($limit and $count <= $limit) { }
7 1 elsif ($count) { }
467 13 10 if $expected == 1
468 5 5 if defined $count and $count >= $expected
471 1 4 if $count != 1
483 1 3 if $count > 1
484 0 4 if defined $label & $label ne ''
485 4 0 if $limit
495 3 4 if $count > 1
496 4 3 if defined $label & $label ne ''
497 2 5 if $limit
514 6 24 unless ($found{$k})
518 5 1 if ($e == 1) { }
533 16 17 if (@fail) { }
3 14 elsif (@warn) { }
538 0 16 if (@warn)
578 0 9 unless $message
594 2 7 if $tested
603 5 4 if ($expected) { }
3 1 elsif (not $set) { }
0 1 elsif (defined $count and defined $limit and $count <= $limit) { }
605 2 3 if ($set and $expected == 1 || $count >= $expected and $limit == 0 || $count <= $limit) { }
2 1 elsif ($count > $limit) { }
1 0 elsif ($expected > 1) { }
613 1 1 $count == 1 ? :
620 1 0 $count == 1 ? :
645 0 0 if $count > 1
646 0 0 if defined $label & $label ne ''
647 0 0 if $limit
659 0 1 if ($count and $limit)
662 0 0 if $count > 1
663 0 0 if defined $label & $label ne ''
679 29 0 if ($TEST_INVERT or $TEST_OUTPUT) { }
715 0 1 unless defined $key and $key ne ''