Branch Coverage

blib/lib/Chemistry/OpenSMILES/Writer.pm
Criterion Covered Total %
branch 74 84 88.1


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})
67 42 462 if &is_chiral($vertex)
78 81 0 if ($order_sub)
88 1 80 if (scalar keys %vertex_symbols != scalar $graph->vertices)
93 0 81 unless @symbols
98 2 40 unless $atom->{'chirality'} =~ /^\@\@?$/
101 1 39 if (scalar @neighbours < 3 or scalar @neighbours > 4)
111 39 0 if ($atom->{'chirality_neighbours'})
112 0 39 if (scalar @neighbours != scalar @{$atom->{'chirality_neighbours'};})
123 16 132 if (scalar @{$atom->{'chirality_neighbours'};} == 3 and $_ != 0)
133 35 4 if ($discovered_from{$atom})
139 2 37 if ($$rings{$vertex_symbols{$atom}})
151 8 31 if (scalar @order_new == 3)
153 6 2 if ($discovered_from{$atom}) { }
160 7 32 if (join("", _permutation_order(@order_new)) ne "0123")
161 4 3 $chirality_now eq '@' ? :
178 54 1296 if ($rings->{$i})
180 28 28 if $i > $j
181 0 28 unless (@ring_ids)
187 28 0 $ring_ids[0] < 10 ? :
192 3 21 $rings->{$i}{$j} eq '\\' ? :
4 24 $rings->{$i}{$j} eq '/' ? :
28 0 $ring_ids[0] < 10 ? :
198 28 1322 if ($ring_ends[$i])
200 0 28 unless ($a == 0) - ($b == 0)
232 3 577 if (exists $vertex->{'isotope'})
237 41 539 if (&is_chiral($vertex))
242 6 574 if ($vertex->{'hcount'})
243 4 2 $vertex->{'hcount'} == 1 ? :
247 8 572 if ($vertex->{'charge'})
248 3 5 $vertex->{'charge'} > 0 ? :
253 0 580 if ($vertex->{'class'})
258 438 142 $is_simple ? :
265 345 134 unless ($graph->has_edge_attribute($u, $v, "bond"))
266 2 343 &is_aromatic($u) && &is_aromatic($v) ? :
270 91 43 if $bond ne "/" and $bond ne "\\"
271 30 13 if $u->{'number'} < $v->{'number'}
282 3 59 if (scalar @_ != 4 or &any(sub { not defined $_ && /^[0-3]$/; } , @_) or join(",", sort(@_)) ne "0,1,2,3")
293 32 27 if ($_[0] != 0)