Branch Coverage

bin/units
Criterion Covered Total %
branch 97 170 57.0


line true false branch
32 5 10 if defined $_
36 0 0 if $m =~ s/\A(\s*)//
39 5 0 !$debugging ? :
86 0 0 if (@{$args->{'args'};}) { }
96 0 0 unless $have =~ /\S/
98 0 0 if is_Zero($have_hr->{'hu'})
102 0 0 unless $want =~ /\S/
104 0 0 if is_Zero($want_hr->{'wu'})
141 0 0 if ($flag =~ /^-(f|-file)?$/) { }
0 0 elsif ($flag =~ /^-(W|-warranty)$/) { }
0 0 elsif ($flag =~ /^-(C|-copying)$/) { }
0 0 elsif ($flag =~ /^--version$/) { }
158 0 0 if $USAGE or @args == 1 or @args > 2
160 0 0 unless @unittabs
161 0 0 unless @unittabs
171 0 20 if (defined $file and -e $file) { }
172 0 0 unless (open my $fh, "<:encoding(UTF-8)", $file)
179 0 20 unless open my $fh, "<:encoding(UTF-8)", "./bin/units"
180 20 25160 if /\A__(?:DATA|END)__/
195 2 18 if ($have =~ /^[-]/)
202 0 20 if ($have =~ s/^\s*\#\s*//)
203 0 0 if ($class->definition_line($have)) { }
210 0 20 unless $have =~ /\S/
214 0 20 if (is_Zero($hu))
226 0 20 unless $want =~ /\S/
230 0 20 if (is_Zero($wu))
251 13 7 if $hu->{'Temperature'}
252 13 7 if $wu->{'Temperature'}
254 13 7 $is_temperature == 2 ? :
261 13 7 if ($is_temperature == 2) { }
7 0 elsif (is_dimensionless($quot)) { }
265 2 11 if $is_negative
266 6 7 unless $is_quantified
269 9 4 exists $hu->{'hof'} ? :
273 9 4 exists $wu->{'hof'} ? :
296 0 0 if $r{'type'} eq "temperature"
298 0 0 if $r{'type'} eq "dimless"
299 0 0 if $r{'type'} eq "error"
328 20 8400 if m[\A/]
330 1340 7060 unless /\S/
344 60 7000 if $data =~ /^\{\s/
346 60 7000 if ($data =~ /^\{\s/) { }
0 7000 elsif (is_Zero($value)) { }
180 6820 elsif (is_fundamental($value)) { }
355 0 7060 unless (defined $rc)
379 9098 504 if exists $unittab{$name}
380 4 500 if ($name =~ /s$/)
383 4 0 if exists $unittab{$shortname}
386 60 440 unless ($prefix)
400 5064 1580 if $u eq "_"
410 0 1389 if $b->{'_'} == 0
413 1389 1510 if $u eq "_"
425 1481 1501 if $d eq "_"
449 7 8 if $u eq "_"
450 0 8 if $r->{$u} != 0
471 0 0 if $k eq "_" or $k eq "hof"
472 0 0 if $u->{$k} > 0
473 0 0 if $u->{$k} < 0
475 0 0 $c == 1 ? :
479 0 0 if $e > 1
482 0 0 if @neg
486 0 0 if $e > 1
583 0 1481 unless (int $_[1] == $_[1])
677 60 68402 if $PARSE_ERROR
680 35112 33290 @$tokens ? :
685 0 68402 unless ($action)
692 7040 61362 if ($primary eq 'accept') { }
21517 39845 elsif ($primary eq 'shift') { }
7040 32805 elsif ($primary eq 'goto') { }
32805 0 elsif ($primary eq 'reduce') { }
711 21517 11288 $semantic ? :
720 0 32805 unless ($goto and $goto->[0] eq "goto")
746 47154 0 if defined $_
753 0 35112 if ref $token
754 0 35112 if $token =~ /[()]/
755 12592 22520 if $token =~ /^\s+$/
756 180 22340 if $token =~ /\A(!.!|\*.\*)\z/
757 3624 18716 if $token =~ m[^\s*(/|\bper\b)\s*$]
758 2300 16416 if $token eq "*" or $token eq "-"
759 801 15615 if $token =~ /^\d+\|\d+$/
760 6409 9206 if $token =~ /^[.\d]/
761 0 9206 if $token eq "^"
770 2162 19355 if ($token =~ m[^([()*/-]|\s*\bper\b\s*)$]) { }
841 18514 elsif ($token =~ /(\d+)\|(\d+)/) { }
772 0 841 if ($2 == 0)