Skip to content

Commit

Permalink
Revert "SDLx::Surface::draw_rect tests"
Browse files Browse the repository at this point in the history
This reverts commit 564c0a9.
  • Loading branch information
jtpalmer committed Sep 3, 2010
1 parent 564c0a9 commit 45e1ce5
Showing 1 changed file with 2 additions and 27 deletions.
29 changes: 2 additions & 27 deletions t/sdlx_surface.t
Expand Up @@ -101,33 +101,8 @@ pass 'Single rect update';
$surfs[0]->update( [ SDL::Rect->new( 0, 1, 2, 3 ), SDL::Rect->new( 2, 4, 5, 6 ) ] ); $surfs[0]->update( [ SDL::Rect->new( 0, 1, 2, 3 ), SDL::Rect->new( 2, 4, 5, 6 ) ] );
pass 'SDL::Rect array update'; pass 'SDL::Rect array update';


my @colors = ( $surfs[0]->draw_rect( [ 0, 0, 10, 20 ], 0xFF00FFFF );
[ 255, 255, 255, 255 ], pass 'draw_rect works';
[ 255, 255, 0, 255 ],
[ 255, 0, 255, 255 ],
[ 0, 255, 255, 255 ],
[ 255, 0, 0, 255 ],
[ 0, 255, 0, 255 ],
[ 0, 0, 255, 255 ],
[ 0, 0, 0, 255 ],
[ 32, 64, 128, 255 ],
[ 128, 32, 64, 255 ],
[ 64, 128, 32, 255 ],
);

foreach my $c (@colors) {
my $color = ( $c->[0] << 24 ) + ( $c->[1] << 16 ) + ( $c->[2] << 8 ) + $c->[3];
$surfs[0]->draw_rect( [ 0, 0, 10, 20 ], $color );

my $num = sprintf('0x%08x', $color);

my $rgba = SDL::Video::get_RGB( $app->format(), $surfs[0]->[0][0] );
is( $rgba->[0], $c->[0], "draw_rect uses correct red for $num" );
is( $rgba->[1], $c->[1], "draw_rect uses correct green for $num" );
is( $rgba->[2], $c->[2], "draw_rect uses correct blue for $num" );

#is($rgba->[3], $c->[3], "draw_rect uses correct alpha for $num");
}


SKIP: SKIP:
{ {
Expand Down

0 comments on commit 45e1ce5

Please sign in to comment.