Added fix for SDL::Surface->format. Fixed test and typemap if SDL::NULL (0) is passed...
[sdlgit/SDL_perl.git] / t / core_video.t
1 #!/usr/bin/perl -w
2 use strict;
3 use SDL;
4 use SDL::Surface;
5 use SDL::Config;
6 use Devel::Peek;
7 use Data::Dumper;
8 use Test::More;
9
10 plan ( tests => 6 );
11
12 use_ok( 'SDL::Video' ); 
13   
14 can_ok ('SDL::Video', qw/
15         get_video_surface
16         get_video_info
17         video_driver_name
18         list_modes
19         /);
20
21 #testing get_video_surface
22 SDL::Init(SDL_INIT_VIDEO);                                                                          
23                                                                                                     
24 my $display = SDL::SetVideoMode(640,480,32, SDL_SWSURFACE );
25
26 diag('Testing SDL::Video');
27
28 isa_ok(SDL::Video::get_video_surface(), 'SDL::Surface', '[get_video_surface] Checking if we get a surface ref back'); 
29
30 isa_ok(SDL::Video::get_video_info(), 'SDL::VideoInfo', '[get_video_info] Checking if we get videoinfo ref back');
31
32 my $driver_name = SDL::Video::video_driver_name();
33
34 pass '[video_driver_name] This is your driver name: '.$driver_name;
35
36 Dump SDL::Video::list_modes( $display->format , SDL_HWSURFACE  );
37
38 pass "Are we still alive?";
39
40 =skip
41         video_mode_ok
42         set_video_mode
43         update_rect
44         update_rects
45         flip
46         set_colors
47         set_palette
48         set_gamma
49         get_gamma_ramp
50         set_gmmma_ramp
51         map_RGB
52         map_RGBA
53         get_RGB
54         get_RGBA
55         create_RGB_surface_from
56         lock_surface
57         unlock_surface
58         convert_surface
59         display_format
60         display_format_alpha
61         load_BMP
62         save_BMP
63         set_color_key
64         set_alpha
65         set_clip_rect
66         get_clip_rect
67         blit_surface
68         fill_rect
69         GL_load_library
70         GL_get_proc_address
71         GL_get_attribute
72         GL_set_attribute
73         GL_swap_buffers
74         GL_attr
75         lock_YUV_overlay
76         unlock_YUV_overlay
77         display_YUV_overlay
78         /);
79