X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcore_surface.t;h=be983549fb1792531cfef32a577e794759749266;hb=a7fbee873b639bb9c89f763b68068985fc4f3123;hp=787858210bd005d88a8ce8164e497e84114a2cc2;hpb=af85b4e965c2e73b698059ea4e4acffb9816b060;p=sdlgit%2FSDL_perl.git diff --git a/t/core_surface.t b/t/core_surface.t index 7878582..be98354 100644 --- a/t/core_surface.t +++ b/t/core_surface.t @@ -15,7 +15,7 @@ use SDL::Surface; use SDL::App; use SDL::Rect; use SDL::Color; -use Test::More tests => 15; +use Test::More tests => 17; my $surface = SDL::Surface->new( SDL::SDL_ANYFORMAT(), 640, 320, 8, 0, 0, 0, 0 ); @@ -31,7 +31,7 @@ is( $clip_rect->y, 0, 'clip_rect has y' ); is( $clip_rect->w, 640, 'clip_rect has width' ); is( $clip_rect->h, 320, 'clip_rect has height' ); -my $image = SDL::Surface->load('test/data/logo.png'); +my $image = SDL::IMG_Load('test/data/logo.png'); is( $image->w, 608, 'image has width' ); is( $image->h, 126, 'image has height' ); @@ -58,6 +58,12 @@ my $app = SDL::App->new( pass 'did this pass'; +my $image_format = $image->display; +isa_ok( $image_format, 'SDL::Surface' ); + +my $image_format_alpha = $image->display_alpha; +isa_ok( $image_format_alpha, 'SDL::Surface' ); + my $rect = SDL::Rect->new( 0, 0, $app->w, $app->h ); my $blue = SDL::Color->new( 0x00, 0x00, 0xff, );