Branch Coverage

blib/lib/Game/Life/Faster.pm
Criterion Covered Total %
branch 58 72 80.5


line true false branch
32 1 2 if ('ARRAY' eq $ref) { }
2 0 elsif (not $ref) { }
43 0 3 unless $self->{'size_x'} =~ / \A [1-9][0-9]* \z /msx and $self->{'size_y'} =~ / \A [1-9][0-9]* \z /msx
71 8 2 if $ix < $min_x
72 2 8 if $ix > $max_x
74 6 34 if $iy < $min_y
75 4 36 if $iy > $max_y
78 0 2 if $max_x < $min_x
92 0 1 unless $self->{'grid'}
96 7 3 if ($self->{'grid'}{$x}) { }
100 5 31 $self->{'grid'}{$x}{$y}[0] ? :
36 34 $self->{'grid'}{$x}{$y} ? :
125 7 3 if ($self->{'grid'}) { }
127 37 21 if ($self->{'grid'}{$x}) { }
129 47 277 $self->{'grid'}{$x}{$_} && $self->{'grid'}{$x}{$_}[0] ? :
140 0 10 wantarray ? :
164 6 2 unless $self->{'living_x'}[$min_x]
168 2 8 if $self->{'living_x'}[--$max_x]
172 2 4 if $self->{'living_y'}[$min_y]
176 2 10 if $self->{'living_y'}[--$max_y]
201 2 1 if 1 == @array and $array[0] =~ / \n /msx
228 66 187 if ($cell->[0]) { }
229 24 42 unless $self->{'live'}[$changed->{$x}{$y}]
232 24 163 if $self->{'breed'}[$changed->{$x}{$y}]
239 2 11 unless $self->{'change_count'}
252 0 74 unless defined $x and defined $y and $x =~ / \A [0-9]+ \z /msx and $y =~ / \A [0-9]+ \z /msx
257 0 74 unless defined $state
260 74 0 if ($x >= 0 and $x < $self->{'size_x'} and $y >= 0 and $y < $self->{'size_y'}) { }
0 0 elsif ($state) { }
267 42 30 $state ? :
2 72 'Toggle_State' eq ref $state ? :
272 6 68 unless my $delta = $state - $prev_state
308 0 2 unless $dflt{$kind}
315 0 6 unless $dflt{$kind}
318 0 6 unless "ARRAY" eq ref $rule
322 0 9 unless $_ =~ / \A [0-9]+ \z /msx