Branch Coverage

blib/lib/Chemistry/File/SMARTS.pm
Criterion Covered Total %
branch 106 128 82.8


line true false branch
91 0 62 if $DEBUG
98 0 85 if $DEBUG
99 5 80 if ($tok eq '(') { }
5 75 elsif ($tok eq ')') { }
105 8 67 if ($next_tok =~ /^\d+$/) { }
106 4 4 if ($digits{$next_tok}) { }
129 4 125 if ($s =~ s/:(\d+)$//)
152 0 129 if $DEBUG
176 1 134 if s/^(!?)H//
179 96 39 if s/(!?) (Zr|Zn|Yb|Y|Xe|W|V|U|Tm|Tl|Ti|Th| Te|Tc|Tb|Ta|Sr|Sn|Sm|Si|Sg|Se|Sc|Sb|S|Ru|Rn|Rh|Rf|Re|Rb|Ra| Pu|Pt|Pr|Po|Pm|Pd|Pb|Pa|P|Os|O|Np|No|Ni|Ne|Nd|Nb|Na|N|Mt|Mt| Mo|Mn|Mg|Md|Lu|Lr|Li|La|Kr|K|Ir|In|I|Hs|Hs|Ho|Hg|Hf|He|Ge| Gd|Ga|Fr|Fm|Fe|F|Eu|Es|Er|Dy|Ds|Db|Cu|Cs|Cr|Co|Cm|Cl|Cf|Ce| Cd|Ca|C|Br|Bk|Bi|Bh|Be|Ba|B|Au|At|As|Ar|Am|Al|Ag|Ac) //x
189 4 131 if s/(!?)\*//
192 1 0 length $2 ? :
1 134 if s/(!?)D(\d?)//
195 11 124 if s/(!?)a//
198 1 134 if s/(!?)A//
201 1 0 length $2 ? :
1 134 if s/(!?)X(\d?)//
205 1 0 length $2 ? :
1 134 if s/(!?)v(\d?)//
209 4 0 length $2 ? :
4 131 if s/(!?)H(\d?)//
213 0 1 length $2 ? :
1 134 if s/(!?)h(\d?)//
216 1 1 length $2 ? :
2 133 if s/(!?)R(\d?)//
220 1 1 length $2 ? :
2 133 if s/(!?)r(\d?)//
224 1 134 if s/(!?)#(\d+)//
227 0 135 if s/(!?)([+-]\d+)//
230 3 132 if s/(!?)(\++)//
233 0 135 if s/(!?)(-+)//
236 1 134 if s/(!?)(\d+)//
239 10 125 if s/(!?)([cnosp])//
256 1 70 if $s eq '.'
260 11 59 if ($s) { }
273 0 70 if $DEBUG
291 0 12 if s/(!?)~//
294 2 10 if s/(!?)-//
297 5 7 if s/(!?)=//
300 2 10 if s/(!?)#//
303 1 11 if s/(!?)://
306 2 10 if s/(!?)\@//
336 0 456 if $DEBUG
337 0 456 if ($state == 0) { }
107 349 elsif ($state == 1) { }
91 258 elsif ($state == 2) { }
137 121 elsif ($state == 3) { }
85 36 elsif ($state == 4) { }
7 29 elsif ($state == 5) { }
29 0 elsif ($state == 6) { }
0 0 elsif ($state == 7) { }
338 0 0 if $char =~ /[()]/
341 29 78 if ($char eq ']')
347 7 71 if $char eq '$'
350 16 75 if ($char =~ m[[-=:~\\/#\@?,;&.!]]) { }
359 29 108 if $char eq '['
360 0 108 if ($char eq '%')
364 38 70 unless @chars
366 1 69 if ($ORGANIC_ELEMS{$symbol . $char}) { }
374 10 75 if $char =~ /[()]/
377 0 7 unless $char eq '('
382 0 29 if $char eq '('
383 7 22 if $char eq ')'
384 7 22 unless ($paren_depth)