Fixed test for hardware or underlying fails
[sdlgit/SDL_perl.git] / t / mixerpm.t
index 0ad5dbe..359d537 100644 (file)
@@ -86,8 +86,12 @@ can_ok ('SDL::Mixer', qw/
        playing_music
        /);
 
+
+if ( SDL::Init(SDL_INIT_AUDIO) < 0) {
+               plan( skip_all => "Cannot initialize audio!!" );
+       }
+
 # these are exported by default, so main:: should know them:
-SDL::Init(SDL_INIT_AUDIO);
 my $mixer = SDL::Mixer->new();
-isa_ok($mixer, 'SDL::Mixer');
+isa_ok($mixer, 'SDL::Mixer', 'Checking if mixer can be build');