Can us SDL::Game::Rect now
[sdlgit/SDL_perl.git] / t / intergation1.t
index 182c280..e0d2426 100644 (file)
@@ -36,7 +36,8 @@ BEGIN {
 use strict;
 use SDL;
 use SDL::Config;
-use SDL::Rect;
+#use SDL::Rect;
+use SDL::Game::Rect;
 use SDL::Color;
 use Test::More;
 
@@ -61,16 +62,26 @@ can_ok ('SDL::App', qw/
 
 my $app  = SDL::App->new(-title => "Test", -width => 640, -height => 480, -init => SDL_INIT_VIDEO);
 
-       my $rect = SDL::Rect->new( 0,0, 10, 20);
+       my $rect = SDL::Game::Rect->new( 0,0, 10, 20);
 
        my $blue = SDL::Color->new(
                -r => 0x00,
                -g => 0x00,
                -b => 0xff,
        );
+
+       my $col = SDL::Color->new( 
+               -r => 0xf0,
+               -g => 0x00,
+               -b => 0xff,
+       );
+
+
+       my $grect = SDL::Game::Rect->new(10, 10, 30, 5);
        $app->fill($rect, $blue);
+       $app->fill($grect, $col);
        $app->update($rect);
-
+       $app->update($grect);
 
         $app->sync;
          sleep(1);