Commit | Line | Data |
05eb21df |
1 | #!perl |
8fde61e3 |
2 | use strict; |
05eb21df |
3 | use warnings; |
4 | use Test::More tests => 10; |
5 | use_ok('SDL::Rect'); |
6 | |
7 | my $rect = SDL::Rect->new( 0, 0, 0, 0 ); |
8 | isa_ok( $rect, 'SDL::Rect' ); |
9 | is( $rect->x(), 0, 'x is 0' ); |
10 | is( $rect->y(), 0, 'y is 0' ); |
11 | is( $rect->w(), 0, 'w is 0' ); |
12 | is( $rect->h(), 0, 'h is 0' ); |
13 | |
14 | $rect->x(1); |
15 | $rect->y(2); |
16 | $rect->w(3); |
17 | $rect->h(4); |
18 | |
19 | is( $rect->x(), 1, 'x is now 1' ); |
20 | is( $rect->y(), 2, 'y is now 2' ); |
21 | is( $rect->w(), 3, 'w is now 3' ); |
22 | is( $rect->h(), 4, 'h is now 4' ); |
8fde61e3 |
23 | |