AI-Pathfinding-AStar-Rectangle
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
t/06-setstart.t view on Meta::CPAN
#!perl
use Test::More 'no_plan';
1 for $Test::More::TODO;
use Data::Dumper;
my $T;
BEGIN {
$T = "AI::Pathfinding::AStar::Rectangle";
eval "use ExtUtils::testlib;" unless grep { m/testlib/ } keys %INC;
eval "use $T";
}
{
my $m = $T->new( { width => 5, height => 5 } );
$m->set_start_xy(-1, 0);
is( $m->begin_x, -1, "begin_x (1)");
is( $m->begin_y, 0, "begin_y (1)");
is( $m->start_x, -1, "start_x (1)");
is( $m->start_y, 0, "start_y (1)");
is( $m->end_x, 3, "end_x (2)");
is( $m->end_y, 4, "end_y (2)");
is( $m->last_x, 3, "last_x (2)");
is( $m->last_y, 4, "last_y (2)");
$m->set_start_xy( 0, -1);
is( $m->begin_x, 0, "begin_x (3)");
is( $m->begin_y, -1, "begin_y (3)");
is( $m->start_x, 0, "start_x (3)");
is( $m->start_y, -1, "start_y (3)");
is( $m->end_x, 4, "end_x (4)");
is( $m->end_y, 3, "end_y (4)");
is( $m->last_x, 4, "last_x (4)");
is( $m->last_y, 3, "last_y (4)");
}
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.470 second using v1.00-cache-2.02-grep-82fe00e-cpan-2c419f77a38b )