moved skip test
[sdlgit/SDL_perl.git] / t / mixerpm.t
CommitLineData
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
34BEGIN {
35 unshift @INC, 'blib/lib','blib/arch';
36}
37
38use strict;
39use SDL;
40use SDL::Config;
41
42use Test::More;
43
44if ( SDL::Config->has('SDL_mixer') ) {
45 plan ( tests => 3 );
46} else {
47 plan ( skip_all => 'SDL_mixer support not compiled' );
48}
49
50use_ok( 'SDL::Mixer' );
51
52can_ok ('SDL::Mixer', qw/
53 new
54 query_spec
55 reserve_channels
56 allocate_channels
57 group_channel
58 group_channels
59 group_available
60 group_count
61 group_oldest
62 group_newer
63 play_channel
64 play_music
65 fade_in_channel
66 fade_in_music
67 channel_volume
68 music_volume
69 halt_channel
70 halt_group
71 halt_music
72 channel_expire
73 fade_out_channel
74 fade_out_group
75 fade_out_music
76 fading_music
77 fading_channel
78 pause
79 resume
80 paused
81 pause_music
82 resume_music
83 rewind_music
84 music_paused
85 playing
86 playing_music
87 /);
88
fe6d1297 89
90if ( SDL::Init(SDL_INIT_AUDIO) < 0) {
91 plan( skip_all => "Cannot initialize audio!!" );
92 }
93
8fde61e3 94# these are exported by default, so main:: should know them:
8fde61e3 95my $mixer = SDL::Mixer->new();
fe6d1297 96isa_ok($mixer, 'SDL::Mixer', 'Checking if mixer can be build');
8fde61e3 97