X-Git-Url: http://git.imager.perl.org/imager.git/blobdiff_plain/fe98a815071dceb05b553a2ec6c13e7d675da213..b851aeebcc6c2c6b52c715206e075b190d55e507:/t/t16matrix.t diff --git a/t/t16matrix.t b/t/t16matrix.t index 7cedd34e..4359d19e 100644 --- a/t/t16matrix.t +++ b/t/t16matrix.t @@ -1,7 +1,6 @@ #!perl -w use strict; -use lib 't'; -use Test::More tests => 8; +use Test::More tests => 10; use Imager; BEGIN { use_ok('Imager::Matrix2d', ':handy') } @@ -15,6 +14,14 @@ my $trans = Imager::Matrix2d->translate('x'=>10, 'y'=>-11); ok(almost_equal($trans, [ 1, 0, 10, 0, 1, -11, 0, 0, 1 ]), "translate matrix"); +my $trans_x = Imager::Matrix2d->translate(x => 10); +ok(almost_equal($trans_x, [ 1, 0, 10, + 0, 1, 0, + 0, 0, 1 ]), "translate just x"); +my $trans_y = Imager::Matrix2d->translate('y' => 11); +ok(almost_equal($trans_y, [ 1, 0, 0, + 0, 1, 11, + 0, 0, 1 ]), "translate just y"); my $rotate = Imager::Matrix2d->rotate(degrees=>90); ok(almost_equal($rotate, [ 0, -1, 0,