Branch Coverage

blib/lib/Chemistry/OpenSMILES/Writer.pm
Criterion Covered Total %
branch 72 82 87.8


line true false branch
28 76 79 if (ref $what eq "HASH")
34 74 5 ref $what eq 'ARRAY' ? :
37 56 23 unless $order_sub
51 0 423 if ($vertex_symbols{$unseen})
65 42 462 if &is_chiral($vertex)
76 81 0 if ($order_sub)
86 1 80 if (scalar keys %vertex_symbols != scalar $graph->vertices)
91 0 81 unless @symbols
96 2 40 unless $atom->{'chirality'} =~ /^\@\@?$/
99 1 39 if (scalar @neighbours < 3 or scalar @neighbours > 4)
109 39 0 if ($atom->{'chirality_neighbours'})
110 0 39 if (scalar @neighbours != scalar @{$atom->{'chirality_neighbours'};})
121 16 132 if (scalar @{$atom->{'chirality_neighbours'};} == 3 and $_ != 0)
131 35 4 if ($discovered_from{$atom})
137 1 38 if ($$rings{$vertex_symbols{$atom}})
149 8 31 if (scalar @order_new == 3)
151 6 2 if ($discovered_from{$atom}) { }
158 7 32 if (join("", _permutation_order(@order_new)) ne "0123")
159 4 3 $chirality_now eq '@' ? :
176 26 1324 if ($rings->{$i})
178 0 28 unless (@ring_ids)
184 28 0 $ring_ids[0] < 10 ? :
189 3 21 $rings->{$i}{$j} eq '\\' ? :
4 24 $rings->{$i}{$j} eq '/' ? :
28 0 $ring_ids[0] < 10 ? :
195 28 1322 if ($ring_ends[$i])
197 0 28 unless ($a == 0) - ($b == 0)
229 3 577 if (exists $vertex->{'isotope'})
234 41 539 if (&is_chiral($vertex))
239 6 574 if ($vertex->{'hcount'})
240 4 2 $vertex->{'hcount'} == 1 ? :
244 8 572 if ($vertex->{'charge'})
245 3 5 $vertex->{'charge'} > 0 ? :
250 0 580 if ($vertex->{'class'})
255 438 142 $is_simple ? :
262 345 134 unless ($graph->has_edge_attribute($u, $v, "bond"))
263 2 343 &is_aromatic($u) && &is_aromatic($v) ? :
267 91 43 if $bond ne "/" and $bond ne "\\"
268 30 13 if $u->{'number'} < $v->{'number'}
279 3 59 if (scalar @_ != 4 or &any(sub { not defined $_ && /^[0-3]$/; } , @_) or join(",", sort(@_)) ne "0,1,2,3")
290 34 25 if ($_[0] != 0)