Branch Coverage

bin/units
Criterion Covered Total %
branch 97 174 55.7


line true false branch
32 5 10 if defined $_
36 0 0 if $m =~ s/\A(\s*)//
39 5 0 !$debugging ? :
87 0 0 if (@{$args->{'args'};}) { }
97 0 0 unless defined $have and $have =~ /\S/
99 0 0 if is_Zero($have_hr->{'hu'})
103 0 0 unless defined $want and $want =~ /\S/
105 0 0 if is_Zero($want_hr->{'wu'})
140 0 0 if ($flag =~ s/\A\-f//) { }
0 0 elsif ($flag eq '--') { }
0 0 elsif ($flag =~ /^--version$/) { }
142 0 0 if length $file == 0
143 0 0 unless defined $file
156 0 0 if @args == 1 or @args > 2
158 0 0 unless @unittabs
159 0 0 unless @unittabs
168 0 20 if (defined $file)
169 0 0 unless (-d $file)
170 0 0 unless (open $fh, "<:encoding(UTF-8)", $file)
178 0 20 unless open $fh, "<:encoding(UTF-8)", __FILE__
180 20 18960 if /\A__(?:DATA|END)__/
191 2 18 if ($have =~ /^[-]/)
198 0 20 if ($have =~ s/^\s*\#\s*//)
199 0 0 if ($class->definition_line($have)) { }
206 0 20 unless $have =~ /\S/
210 0 20 if (is_Zero($hu))
222 0 20 unless $want =~ /\S/
226 0 20 if (is_Zero($wu))
247 13 7 if $hu->{'Temperature'}
248 13 7 if $wu->{'Temperature'}
250 13 7 $is_temperature == 2 ? :
257 13 7 if ($is_temperature == 2) { }
7 0 elsif (is_dimensionless($quot)) { }
261 2 11 if $is_negative
262 6 7 unless $is_quantified
265 9 4 exists $hu->{'hof'} ? :
269 9 4 exists $wu->{'hof'} ? :
292 0 0 if $r{'type'} eq "temperature"
294 0 0 if $r{'type'} eq "dimless"
295 0 0 if $r{'type'} eq "error"
309 20 8400 if m[\A/]
311 1340 7060 unless /\S/
325 60 7000 if $data =~ /^\{\s/
327 60 7000 if ($data =~ /^\{\s/) { }
0 7000 elsif (is_Zero($value)) { }
180 6820 elsif (is_fundamental($value)) { }
336 0 7060 unless (defined $rc)
360 9098 504 if exists $unittab{$name}
361 4 500 if ($name =~ /s$/)
364 4 0 if exists $unittab{$shortname}
367 60 440 unless ($prefix)
381 5064 1580 if $u eq "_"
391 0 1389 if $b->{'_'} == 0
394 1389 1510 if $u eq "_"
406 1481 1501 if $d eq "_"
430 7 8 if $u eq "_"
431 0 8 if $r->{$u} != 0
452 0 0 if $k eq "_" or $k eq "hof"
453 0 0 if $u->{$k} > 0
454 0 0 if $u->{$k} < 0
456 0 0 $c == 1 ? :
460 0 0 if $e > 1
463 0 0 if @neg
467 0 0 if $e > 1
564 0 1481 unless (int $_[1] == $_[1])
658 60 68402 if $PARSE_ERROR
661 35112 33290 @$tokens ? :
666 0 68402 unless ($action)
673 7040 61362 if ($primary eq 'accept') { }
21517 39845 elsif ($primary eq 'shift') { }
7040 32805 elsif ($primary eq 'goto') { }
32805 0 elsif ($primary eq 'reduce') { }
692 21517 11288 $semantic ? :
701 0 32805 unless ($goto and $goto->[0] eq "goto")
727 47154 0 if defined $_
734 0 35112 if ref $token
735 0 35112 if $token =~ /[()]/
736 12592 22520 if $token =~ /^\s+$/
737 180 22340 if $token =~ /\A(!.!|\*.\*)\z/
738 3624 18716 if $token =~ m[^\s*(/|\bper\b)\s*$]
739 2300 16416 if $token eq "*" or $token eq "-"
740 801 15615 if $token =~ /^\d+\|\d+$/
741 6409 9206 if $token =~ /^[.\d]/
742 0 9206 if $token eq "^"
751 2162 19355 if ($token =~ m[^([()*/-]|\s*\bper\b\s*)$]) { }
841 18514 elsif ($token =~ /(\d+)\|(\d+)/) { }
753 0 841 if ($2 == 0)