Commit | Line | Data |
8fde61e3 |
1 | #!/usr/bin/perl -w |
2 | # |
3 | # Copyright (C) 2003 Tels |
4 | # Copyright (C) 2004 David J. Goehrig |
7b6a53a1 |
5 | # |
6 | # Copyright (C) 2005 David J. Goehrig <dgoehrig\@cpan.org> |
7 | # |
8 | # ------------------------------------------------------------------------------ |
9 | # |
10 | # This library is free software; you can redistribute it and/or |
11 | # modify it under the terms of the GNU Lesser General Public |
12 | # License as published by the Free Software Foundation; either |
13 | # version 2.1 of the License, or (at your option) any later version. |
14 | # |
15 | # This library is distributed in the hope that it will be useful, |
16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
18 | # Lesser General Public License for more details. |
19 | # |
20 | # You should have received a copy of the GNU Lesser General Public |
21 | # License along with this library; if not, write to the Free Software |
22 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
23 | # |
24 | # ------------------------------------------------------------------------------ |
25 | # |
26 | # Please feel free to send questions, suggestions or improvements to: |
27 | # |
28 | # David J. Goehrig |
29 | # dgoehrig\@cpan.org |
30 | # |
31 | # |
8fde61e3 |
32 | # basic testing of SDL::Mixer |
33 | |
34 | BEGIN { |
35 | unshift @INC, 'blib/lib','blib/arch'; |
36 | } |
37 | |
38 | use strict; |
39 | use SDL; |
40 | use SDL::Config; |
41 | |
42 | use Test::More; |
43 | |
44 | if ( SDL::Config->has('SDL_mixer') ) { |
90a92338 |
45 | plan ( tests => 2 ); |
46 | } |
8898221d |
47 | else { |
8fde61e3 |
48 | plan ( skip_all => 'SDL_mixer support not compiled' ); |
49 | } |
50 | |
51 | use_ok( 'SDL::Mixer' ); |
52 | |
53 | can_ok ('SDL::Mixer', qw/ |
54 | new |
55 | query_spec |
56 | reserve_channels |
57 | allocate_channels |
58 | group_channel |
59 | group_channels |
60 | group_available |
61 | group_count |
62 | group_oldest |
63 | group_newer |
64 | play_channel |
65 | play_music |
66 | fade_in_channel |
67 | fade_in_music |
68 | channel_volume |
69 | music_volume |
70 | halt_channel |
71 | halt_group |
72 | halt_music |
73 | channel_expire |
74 | fade_out_channel |
75 | fade_out_group |
76 | fade_out_music |
77 | fading_music |
78 | fading_channel |
79 | pause |
80 | resume |
81 | paused |
82 | pause_music |
83 | resume_music |
84 | rewind_music |
85 | music_paused |
86 | playing |
87 | playing_music |
88 | /); |
89 | |
fe6d1297 |
90 | |
8fde61e3 |
91 | # these are exported by default, so main:: should know them: |
90a92338 |
92 | #my $mixer = SDL::Mixer->new(); |
93 | #isa_ok($mixer, 'SDL::Mixer', 'Checking if mixer can be build'); |
8fde61e3 |
94 | |