Commit | Line | Data |
b7ed9095 |
1 | #!perl -w |
2 | # Copyright (C) 2009 kthakore |
3 | # |
4 | # Spec tests for SDL::Surface |
5 | # |
6 | |
7 | BEGIN { |
8 | unshift @INC, 'blib/lib','blib/arch'; |
9 | } |
10 | |
11 | use strict; |
12 | use SDL; |
13 | use SDL::Config; |
14 | use SDL::Surface; |
15 | use SDL::App; |
16 | use SDL::Rect; |
17 | use SDL::Color; |
18 | use Test::More; |
19 | |
20 | plan (tests => 2 ); |
21 | |
22 | |
23 | my $app = SDL::App->new(-title => "Test", -width => 640, -height => 480, -init => SDL_INIT_VIDEO); |
24 | |
25 | pass 'did this pass'; |
26 | |
27 | my $rect = SDL::Rect->new(0,0, $app->w, $app->h); |
28 | |
29 | |
30 | my $blue = SDL::Color->new( |
31 | 0x00, |
32 | 0x00, |
33 | 0xff, |
34 | ); |
35 | |
36 | $app->fill_rect($rect,$blue); |
37 | |
38 | |
5ae1d2ee |
39 | diag('This is in surface : '.SDL::Surface::get_pixels($app)); |
b7ed9095 |
40 | |
41 | pass 'did this pass'; |
42 | |