From: Kartik Thakore Date: Sun, 30 Aug 2009 22:52:53 +0000 (-0400) Subject: Fixed test for hardware or underlying fails X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fe6d1297a5ad798f9935c4ee4771e907554c2299;p=sdlgit%2FSDL_perl.git Fixed test for hardware or underlying fails --- diff --git a/lib/SDL.pm b/lib/SDL.pm index 0eb9ea0..18f61c4 100644 --- a/lib/SDL.pm +++ b/lib/SDL.pm @@ -58,7 +58,7 @@ $VERSION = '2.2.2.5'; print "$VERSION" if (defined($ARGV[0]) && ($ARGV[0] eq '--SDLperl')); -$SDL::DEBUG=1; +$SDL::DEBUG=0; sub NULL { return 0; diff --git a/t/mixerpm.t b/t/mixerpm.t index 0ad5dbe..359d537 100644 --- a/t/mixerpm.t +++ b/t/mixerpm.t @@ -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'); diff --git a/t/timerpm.t b/t/timerpm.t index 3e3624b..b94b1ee 100644 --- a/t/timerpm.t +++ b/t/timerpm.t @@ -51,7 +51,11 @@ can_ok ('SDL::Timer', qw/ my $fired = 0; -SDL::Init(SDL_INIT_TIMER); +if (SDL::Init(SDL_INIT_TIMER) < 0 ) +{ + plan( skip_all => "Cannot initialize timer!!" ); + +} my $timer = new SDL::Timer sub { $fired++ }, -delay => 30, -times => 1;