Branch Coverage

lib/PMLTQ/Suggest/Utils.pm
Criterion Covered Total %
branch 21 84 25.0


line true false branch
32 15 44 if &{$code;}()
58 0 15 unless defined $win
60 0 15 unless defined $fsfile and defined $goto and $goto ne ''
62 0 15 if ($goto =~ /^##([0-9]+)/) { }
0 15 elsif ($goto =~ /^#([0-9]+)/) { }
15 0 elsif ($goto =~ /^#([^#]+)$/) { }
67 0 0 if $win->{'treeNo'} != $no
75 0 0 if ($fsfile->treeList->[$i]{'form'} eq "#$1")
80 0 0 unless defined $no
87 15 0 if ('Treex::PML::Schema::CDATA'->check_string_format($id, 'ID'))
89 15 0 if (UNIVERSAL::isa($id_hash, 'HASH') and exists $id_hash->{$id})
103 0 15 if (defined $root and not defined $n)
107 0 0 if (not defined $n or $n == -1)
111 15 0 if (defined $n) { }
124 0 0 if ($goto =~ /\.([0-9]+)$/) { }
0 0 elsif ($goto =~ /\.([^0-9#][^#]*)$/) { }
126 0 0 if ($root) { }
136 0 0 if ('Treex::PML::Schema::CDATA'->check_string_format($id, 'ID'))
138 0 0 if (UNIVERSAL::isa($id_hash, 'HASH') and exists $id_hash->{$id}) { }
142 0 0 if $win->{'currentNode'} = $id_hash->{$id}
165 0 0 if ($trees_type and $root_type)
171 0 0 if ($trees_type_is == 6) { }
0 0 elsif ($trees_type_is == 5) { }
196 0 0 if (@{$paths{$el->[0]};})
200 0 0 unless $found
207 0 0 $is_sequence ? :
208 0 0 unless $paths
210 0 0 if ($value == $root)
239 0 15 unless defined $filename
240 0 15 if ($filename =~ s/(##?[0-9A-Z]+(?:-?\.[0-9]+)?)$//) { }
0 15 elsif ($filename =~ /^ (.*) # file name with any characters followed by (\#\#[0-9]+\.) # 2x#, at least one number and full stop ([^0-9\#][^\#]*) # followed by one non-numeric not-# character and any number of not-# chars $ /x and 'Treex::PML::Schema::CDATA'->check_string_format($3, 'ID')) { }
15 0 elsif ($filename =~ /^ (.*) # file name with any characters followed by \# # one hash followed by ([^\#]+) # any number of not-# characters $ /x and 'Treex::PML::Schema::CDATA'->check_string_format($2, 'ID')) { }
281 0 19 if ($Treex::PML::FSError)
285 19 0 if ($requires)
290 0 9 unless ($secondary)
309 10 0 if ($requires)
314 9 0 ref $fsfile->appData('ref') ? :
316 9 0 if (UNIVERSAL::DOES::does($req_fs, 'Treex::PML::Document'))
329 0 0 if $fsfile->appData('fs-require-loaded')
332 0 0 if (defined $requires)
334 0 0 if ref $fsfile->appData('ref')->{$req->[0]}
344 0 0 if (not $status2->{'ok'}) { }