Commits

Anonymous committed 342d0aa

Added a test for the _dests.

Comments (0)

Files changed (2)

modules/Shlomif-Sokoban-Solver/lib/Shlomif/Sokoban/Solver/Board.pm

 {
     my ($self, $x, $y) = @_;
 
-    return (vec(${$self->_data()}, $y*$self->width()+$x, 2) 
+    return (vec(${$self->_data()}, $y*$self->width()+$x, 2)
             == $dest_place_bits
         );
 }

modules/Shlomif-Sokoban-Solver/t/01-loading.t

 use strict;
 use warnings;
 
-use Test::More tests => 12;
+use Test::More tests => 13;
 
 use Shlomif::Sokoban::Solver::Board;
 
     ok ($board->is_dest(4, 3), "4,7 is a dest");
     # TEST
     ok (!$board->is_wall(4, 3), "4,3 (which is a dest) is not a wall");
+    # TEST
+    is_deeply($board->_dests(),
+        [[4,3], [3,4], [5,4], [4,5]],
+    );
 }