Branch Coverage

blib/lib/Chemistry/OpenSMILES.pm
Criterion Covered Total %
branch 62 66 93.9


line true false branch
79 58 7 unless &is_chiral_tetrahedral($atom)
81 2 5 if is_ring_atom($moiety, $atom, scalar $moiety->edges)
83 3 2 exists $atom->{'hcount'} ? :
84 0 5 if $moiety->degree($atom) + $hcount != 4
89 2 3 if scalar keys %colors == 4
105 3659 5 if (ref $what eq 'HASH') { }
115 261 5 if (ref $what eq 'HASH') { }
141 24 36 unless $moiety->degree($atom) > 1
157 50 72 unless $max_length
160 52 70 if &any(sub { $moiety->degree($_) == 1; } , $a, $b)
161 14 56 if scalar $moiety->vertices > scalar $moiety->edges
163 25 31 if ($max_length < 0)
167 350 5 unless $_->[0] == $a and $_->[1] == $b
180 0 597 if @seen != 1
217 25 5 if (ref $what eq 'HASH') { }
219 2 23 if (&is_chiral_tetrahedral($what))
220 1 1 $what->{'chirality'} eq '@' ? :
231 16 8 $_[0] eq '/' ? :
241 8 133 if (&is_chiral_tetrahedral($atom))
242 1 7 if ($moiety->degree($atom) < 3) { }
7 0 elsif ($moiety->degree($atom) == 4 and $color_sub) { }
253 1 6 if (scalar keys %colors != 4 and not is_ring_atom($moiety, $atom, scalar $moiety->edges))
265 22 119 if (not &is_chiral($atom) and $moiety->degree($atom) == 4)
267 5 17 unless ($color_sub_local)
272 3 19 if (scalar keys %colors == 4)
284 1 132 if ($A eq $B)
290 6 127 if ($moiety->has_edge_attribute(@$bond, "bond"))
292 1 5 if ($bond_type eq '=') { }
5 0 elsif ($bond_type =~ m[^[\\/]$]) { }
300 1 3 if ($bond_types{$_} and @{$bond_types{$_};} > 1)
323 1 4 unless ($bond_types{'='})
345 24 14 if ($moiety->has_edge_attribute($atom, $neighbour, 'bond')) { }
350 7 31 if ($bond_type =~ m[^[\\/]$] and $atom->{'number'} > $neighbour->{'number'})