Branch Coverage

blib/lib/Hardware/Vhdl/Tidy.pm
Criterion Covered Total %
branch 88 120 73.3


line true false branch
58 2 15 if ($inplace) { }
74 0 17 ref $_[0] eq 'HASH' ? :
77 17 0 if (defined $args{'source'}) { }
86 2 15 if (defined $args{'destination'}) { }
97 0 17 if ($@)
131 29 0 ref $_[0] eq 'HASH' ? :
132 1 28 unless defined $args{'source'}
133 1 27 unless defined $args{'destination'}
135 60 102 unless (defined $args{$opt})
142 0 27 if ($outtype eq '') { }
18 9 elsif ($outtype eq 'GLOB') { }
1 8 elsif ($outtype eq 'SCALAR') { }
7 1 elsif ($outtype eq 'ARRAY') { }
1 0 elsif ($outtype eq 'CODE') { }
0 0 elsif (eval { do { $outobj->can('addtokens') } } and not $@) { }
163 4 23 if ($@)
182 1188 310 @stack ? :
183 1188 310 @stack ? :
184 683 815 if (substr($type, 0, 1) eq 'c')
185 21 662 if (@outline == 0 and $args{'preprocessor_prefix'} ne '' and substr($token, 0, length $args{'preprocessor_prefix'}) eq $args{'preprocessor_prefix'}) { }
0 662 elsif ($token eq '(') { }
0 662 elsif ($token eq ')') { }
662 0 elsif ($bracks == 0) { }
191 21 56 if ($type eq 'wn')
192 0 21 if ($lastchar eq '\\') { }
206 0 662 $lctoken =~ /^\\.*\\$/ ? :
208 102 560 if ($lctoken eq ';') { }
27 533 elsif ($lctoken eq 'end' and $linestart) { }
21 512 elsif ($lctoken =~ /^(begin|elsif)$/) { }
0 512 elsif ($lctoken eq 'else' and @stack and $botlevel eq 'if') { }
1 511 elsif ($lctoken eq 'is' and $line =~ /^ (entity|architecture|configuration|package|((im)?pure \s )?function|procedure) \s /msx) { }
0 511 elsif ($lctoken eq 'is' and $line =~ /^(\S+ : )?case /) { }
1 510 elsif ($lctoken ne 'is' and $line =~ /^ (\S+ \s : \s )?(component|block|(postponed \s )?process) \s (is \s )?\S+ \s $/msx) { }
6 504 elsif ($lctoken eq 'loop' and $line =~ /^(\S+ : )?(for|while) /) { }
0 504 elsif ($lctoken eq 'use') { }
0 504 elsif ($lctoken =~ /^ (then|generate) $/msx) { }
0 504 elsif ($lctoken eq 'for' and $toplevel eq 'configuration' and not $line =~ /^end for $/ and not $line =~ / end for $/) { }
6 498 elsif ($lctoken =~ /^(case|if|for|while|loop)$/ and $line =~ /^((\S+) : )?\S+ $/) { }
21 477 elsif ($lctoken eq 'process' and $line =~ /^((\S+) : )?(postponed )?process $/) { }
0 477 elsif ($lctoken eq '=>' and $botlevel eq 'case' and $line =~ /^when /) { }
0 477 elsif ($lctoken eq 'when' and $linestart and $botlevel eq 'case=>') { }
0 477 elsif ($line =~ /^(im)?pure function $/) { }
2 475 elsif ($lctoken =~ /^(entity|architecture|configuration|package|function|procedure|component|units)$/ and $linestart) { }
0 475 elsif ($lctoken =~ /^(block)$/ and $line =~ /^(\S+) : \S+ $/) { }
0 950 elsif ($line =~ /^type / and $lctoken =~ /^(access|units|record)$/) { }
209 0 102 if ($toplevel eq 'architecture' and $line =~ /^for .* : / or $line =~ /^(pure |impure |)function \S+ return .* ; $/ and not $line =~ / is / or $line =~ /^procedure \S+ ; $/ or $botlevel eq 'type-access')
228 0 27 if ($botlevel eq 'case=>')
280 0 6 if ($lctoken eq 'loop')
320 0 683 if ($indent < 0)
321 0 683 if ($bracks < 0)
323 0 683 if ($debug & 1)
327 0 0 if $bracks == 0 and not $linestart
335 527 971 if (@outline == 0) { }
336 278 249 if ($type ne 'ws')
338 15 263 if ($type eq 'pp' and not $args{'indent_preprocessor'}) { }
344 63 200 if $bracks == 0 and not $linestart
347 60 203 if ($args{'tab_spaces'} > 0) { }
359 277 1221 if ($type =~ /^(wn|pp)$/)
368 1 21 if @outline
369 0 22 if $debug