Branch Coverage

blib/lib/Chemistry/OpenSMILES/Stereo.pm
Criterion Covered Total %
branch 64 102 62.7


line true false branch
36 2 0 unless $order_sub
39 2 13 if is_double_bond($graph, @$_) and not is_ring_bond($graph, @$_)
57 2 13 unless is_single_bond($graph, @$bond)
59 3 10 if ($incident_double_bonds{$bond->[0]})
63 1 12 if ($incident_double_bonds{$bond->[1]})
69 4 0 if $bond1 == $bond2
96 2 0 if %distinct_invariants_now <= %distinct_invariants
109 0 0 unless $invariants{join "", sort(@$b)} <=> $invariants{join "", sort(@$a)} or &min(map({&$order_sub($_);} @$a)) <=> &min(map({&$order_sub($_);} @$b))
124 0 1 unless $order_sub
128 0 1 if @neighbours2 < 2 or @neighbours3 < 2
143 0 1 if (@cistrans_bonds2 + @cistrans_bonds3 > 1)
150 0 0 if (@neighbours2 == 2 and not @cistrans_bonds2 and not &any(sub { is_single_bond($graph, $atom2, $_); } , @neighbours2) or @neighbours3 == 2 and not @cistrans_bonds3 and not &any(sub { is_single_bond($graph, $atom3, $_); } , @neighbours3))
165 0 1 if (@cistrans_bonds3 or not @cistrans_bonds2 and &$order_sub($atom2) > &$order_sub($atom3))
186 2 0 if ($setting)
193 0 1 unless ($bond_will_be_marked)
201 0 1 @cistrans_bonds2 ? :
202 1 0 unless (@cistrans_bonds2)
210 0 2 unless $setting
212 1 1 if $setting eq "cis"
213 0 2 if $atom1->{'number'} > $atom2->{'number'}
214 0 2 if $atom4->{'number'} < $atom3->{'number'}
216 1 1 unless $atom4_marked
220 1 1 if $atom1 eq $first_atom
223 0 1 unless $setting
225 1 0 if $setting eq "cis"
226 1 0 if $atom1->{'number'} > $atom2->{'number'}
227 0 1 if $atom4->{'number'} < $atom3->{'number'}
239 10 1 unless &Chemistry::OpenSMILES::is_chiral_tetrahedral($atom)
241 0 1 unless @{$atom->{'chirality_neighbours'};} >= 3 and @{$atom->{'chirality_neighbours'};} <= 4
244 0 1 if (@chirality_neighbours == 3)
249 1 0 if ($atom->{'chirality'} eq "\@")
259 2 2 if ($i % 2)
287 2 13 if is_double_bond($moiety, @$_) and not is_ring_bond($moiety, @$_)
298 0 1 if @atom2_neighbours < 2 or @atom2_neighbours > 3 or @atom3_neighbours < 2 or @atom3_neighbours > 3
305 0 1 unless $atom1 and $atom4
307 2 1 if $_ != $atom1
308 2 1 if $_ != $atom4
313 0 1 if $atom1->{'number'} > $atom2->{'number'}
314 0 1 if $atom3->{'number'} > $atom4->{'number'}
316 0 1 $is_cis ? :
318 1 0 if ($atom1_para)
319 0 1 $is_cis ? :
322 1 0 if ($atom4_para)
323 0 1 $is_cis ? :
326 1 0 if ($atom1_para and $atom4_para)
327 0 1 $is_cis ? :
334 14 5 unless is_cis_trans_bond($moiety, @$bond)
355 2 6 unless @$_ == 2
358 0 6 if ($color_sub) { }
361 4 2 if &any(sub { $moiety->degree($_) != 1; } , @$_)
364 2 0 if &uniq(@representations) == 1