X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcore_surface.t;h=e006f6059c3bc6fb254a8dee8c7608204ce2879e;hb=b73117ba7212bfda61bbcb10859e1d03bbaecafa;hp=d81eaf0386e4676e8c45ad5e2f1459d945e31c1c;hpb=f7ce55ec6ad0a21bb1fa18aec222fa0274764557;p=sdlgit%2FSDL_perl.git diff --git a/t/core_surface.t b/t/core_surface.t index d81eaf0..e006f60 100644 --- a/t/core_surface.t +++ b/t/core_surface.t @@ -15,11 +15,13 @@ use SDL::Surface; use SDL::App; use SDL::Rect; use SDL::Color; +use SDL::Video; use SDL::PixelFormat; use Test::More tests => 35; my $surface = SDL::Surface->new( SDL::SDL_ANYFORMAT(), 640, 320, 8, 0, 0, 0, 0 ); + #TODO: test SDL::Surface->new_from isa_ok( $surface, 'SDL::Surface' ); is( $surface->w, 640, 'surface has width' ); is( $surface->h, 320, 'surface has height' ); @@ -91,10 +93,11 @@ my $rect = SDL::Rect->new( 0, 0, $app->w, $app->h ); my $blue_pixel = SDL::MapRGB( $app_pixel_format, 0x00, 0x00, 0xff ); SDL::FillRect( $app, $rect, $blue_pixel ); -SDL::UpdateRect( $app, 0, 0, 0, 0 ); +SDL::Video::update_rect( $app, 0, 0, 0, 0 ); +SDL::Video::update_rects( $app, $small_rect ); diag( 'This is in surface : ' . SDL::Surface::get_pixels($app) ); pass 'did this pass'; -SDL::Delay(100); +SDL::delay(100);