Added Mix_VolumeChunk to SDL::Mixer + tests
[sdlgit/SDL_perl.git] / t / mixerpm.t
1 #!/usr/bin/perl -w
2 #
3 # Copyright (C) 2003 Tels
4 # Copyright (C) 2004 David J. Goehrig
5 # Copyright (C) 2009 Kartik Thakore
6 # basic testing of SDL::Mixer
7
8 BEGIN {
9         unshift @INC, 'blib/lib','blib/arch';
10 }
11
12 use strict;
13 use SDL;
14 use SDL::Config;
15
16 use Test::More;
17
18 if ( SDL::Config->has('SDL_mixer') ) {
19         plan ( tests => 3 );
20 } else {
21         plan ( skip_all => 'SDL_mixer support not compiled' );
22 }
23
24 use_ok( 'SDL::Mixer' ); 
25   
26 can_ok ('SDL::Mixer', qw/
27         new
28         query_spec
29         reserve_channels
30         allocate_channels
31         group_channel
32         group_channels
33         group_available
34         group_count
35         group_oldest
36         group_newer
37         play_channel
38         play_music
39         fade_in_channel
40         fade_in_music
41         channel_volume
42         music_volume
43         halt_channel
44         halt_group
45         halt_music
46         channel_expire
47         fade_out_channel
48         fade_out_group
49         fade_out_music
50         fading_music
51         fading_channel
52         pause
53         resume
54         paused
55         pause_music
56         resume_music
57         rewind_music
58         music_paused
59         playing
60         playing_music
61         mix_volume_chunk
62         /);
63
64 # these are exported by default, so main:: should know them:
65 SDL::Init(SDL_INIT_AUDIO);
66 my $mixer = SDL::Mixer->new();
67 isa_ok($mixer, 'SDL::Mixer');
68