Branch Coverage

blib/lib/JavaScript/Swell.pm
Criterion Covered Total %
branch 92 138 66.6


line true false branch
56 2 2 if (@_)
69 124 185 unless @_
70 185 0 if ($_[0] =~ /^\-{0,1}\d+$/) { }
71 180 5 if (0 <= $self->cursor + $_[0] and $self->split_source + 0 > $self->cursor + $_[0]) { }
85 57 3 if $c =~ /(.)$/
88 58 2 unless @_
93 5 4 if $self->squishmode
101 12 46 if $c =~ /\s/o
103 36 10 if (not $RegularExpression_shortcut{$self->re_word . $c}) { }
110 68 62 @_ ? :
111 2 128 @_ ? :
113 2 4 @_ ? :
114 2 736 @_ ? :
115 2 62 @_ ? :
116 2 0 @_ ? :
117 2 6 @_ ? :
118 48 182 @_ ? :
142 41 0 @_ ? :
143 41 0 @_ ? :
144 0 41 @_ ? :
145 0 41 @_ ? :
150 22 19 if $self->squishmode
153 8 33 if $cl =~ /[\s\(\[]/
159 0 41 if ($TERMSPACE{$cc4}) { }
0 41 elsif ($TERMSPACE{$cc3}) { }
0 41 elsif ($TERMSPACE{$cc2}) { }
2 39 elsif ($cc2 eq '++' or $cc2 eq '--') { }
3 36 elsif ($self->re_word eq '=' || $self->re_word eq '(' and $c eq '+' || $c eq '-' and $c2 =~ /^\d$/ or $TERMSPACE{$c} and $TERMSPACE{$c2}) { }
3 33 elsif ($TERMSPACE{$c}) { }
0 33 elsif ($c eq ',') { }
192 3 5 if $s1
194 1 7 if $s2
204 9 7 if $c =~ /\s/o and $self->get_charlast =~ /\s/ || !($c2 =~ /[_a-zA-Z0-9]/)
206 0 53 if ($c eq '/')
207 0 0 if ($c2 eq '*') { }
0 0 elsif ($c2 eq '/') { }
0 0 elsif ($self->is_re_before) { }
217 0 0 unless $self->squishmode
227 0 53 if ($c =~ /\s/o and $c2 =~ /\s/o) { }
0 53 elsif ($c eq '"' or $c eq q[']) { }
2 51 elsif ($c eq '(') { }
2 49 elsif ($c eq ')') { }
2 47 elsif ($c eq '{') { }
2 45 elsif ($c eq '}') { }
4 41 elsif ($c eq ';') { }
0 41 elsif ($self->squishmode and $c eq 'i' and $bword eq 'else') { }
8 33 elsif ($self->term_spacer($c, $c2)) { }
3 30 elsif ($self->squishmode and $c =~ /\s/o and not $self->get_charlast =~ /[_a-zA-Z0-9]/ && $c2 =~ /[_a-zA-Z0-9]/) { }
30 0 elsif ($c ne "\n") { }
236 1 1 if $bword =~ /^(case|catch|do|for|function|if|import|switch|throw|try|while|with)$/o and not $self->squishmode
241 2 0 if ($self->parentheses_nest) { }
247 0 2 if $c2 =~ /[\_a-z-A-Z0-9]/
249 1 1 if $bword =~ /^(case|catch|do|try|else|\))$/o and not $self->squishmode
253 2 0 unless $c2 eq '}'
258 0 2 if ($c2 eq ';')
262 2 0 if ($c2 ne '}')
267 0 4 if ($self->parentheses_nest and not $self->squishmode) { }
3 1 elsif ($c2 ne '}') { }
286 0 0 if ($c eq '*' and $c2 eq '/') { }
0 0 elsif ($c eq "\n") { }
303 0 0 if ($c eq "\n") { }
307 0 0 unless $self->squishmode
315 0 0 if ($c eq $self->quote)
324 0 0 if ($c eq '/' or $c eq "\n") { }
334 2 0 if @_
340 0 62 if ($c eq '\\') { }
0 62 elsif ($self->is_linehead and $c =~ /\s/) { }
358 0 1 if (ref $_[0] eq 'JavaScript::Swell') { }
369 0 1 if (ref $_[0] eq 'JavaScript::Swell') { }