Branch Coverage

blib/lib/Karel/Robot.pm
Criterion Covered Total %
branch 17 24 70.8


line true false branch
46 42 0 if (not $self->does($with_grid_class))
97 1 17 if ($self->can('grid'))
103 0 3 unless open $IN, '<', $that
104 0 13 unless open $IN, '<', \$that
107 1 17 unless $open
112 0 17 unless $header =~ /^\# \s* karel \s+ (v[0-9]+\.[0-9]{2}) \s+ ([0-9]+) \s+ ([0-9]+)/x
126 40 1 if 'W' eq $chars[$c] and $r == 0 || $r == $y + 1 || $c == 0 || $c == $x + 1
142 0 17 if $direction
151 1 139 unless $build
161 2 14 if 'w' eq lc $grid->at(@pos)
165 0 14 unless (eval { do { $_[0]->set_grid($grid, @pos, $direction); 1 } })
207 0 18 unless $self->knows($command)