Branch Coverage

lib/Test/Approx.pm
Criterion Covered Total %
branch 53 74 71.6


line true false branch
69 0 1 if @_
79 10 22 if $arg eq '' or $unparsed != 0 or $!
80 8 14 if $num =~ /\.\d*\z/
91 0 16 unless defined $arg1
92 0 16 unless defined $arg2
98 7 9 if ($arg1_type eq 'int') { }
4 5 elsif ($arg1_type eq 'num') { }
99 6 1 if $arg2_type eq 'int'
100 1 0 if $arg2_type eq 'num'
102 4 0 if $arg2_type eq 'int' or $arg2_type eq 'num'
114 0 7 unless defined $str1
115 0 7 unless defined $str2
116 5 2 unless defined $tolerance
119 3 4 length $str1 > 8 ? :
120 3 4 length $str2 > 8 ? :
124 0 7 unless defined $msg
128 7 0 if ($tolerance =~ /^(.+)%$/) { }
142 3 4 unless ($Test->ok($dist <= $threshold, $msg))
143 3 0 if $msg ne $msg2
152 13 0 defined $num1 ? :
153 13 0 defined $num2 ? :
154 10 3 unless defined $tolerance
157 0 13 length $num1 > 8 ? :
158 1 12 length $num2 > 8 ? :
162 0 13 unless defined $msg
166 10 3 if ($tolerance =~ /^(.+)%$/) { }
182 3 10 unless ($Test->ok($dist <= $threshold, $msg))
183 3 0 if $msg ne $msg2
192 14 0 defined $int1 ? :
193 14 0 defined $int2 ? :
194 13 1 unless defined $tolerance
197 0 14 length $int1 > 8 ? :
198 0 14 length $int2 > 8 ? :
202 0 14 unless defined $msg
206 13 1 if ($tolerance =~ /^(.+)%$/) { }
222 3 11 unless ($Test->ok($dist <= $threshold, $msg))
223 3 0 if $msg ne $msg2