Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

silent tests now, unless --verbose switch

  • Loading branch information...
commit 27b1140d43720453dc16494a61576c9b8831b699 1 parent 08ce144
Tobias Leich authored
View
30 t/config.t
@@ -4,21 +4,21 @@ use Test::More tests => 2;
BEGIN { use_ok( 'SDL::Config' ); }
-diag "Testing SDL::Config";
-diag "Has SDL = " . SDL::Config->has('SDL');
-diag "Has SDL_mixer = " . SDL::Config->has('SDL_mixer');
-diag "Has SDL_image = " . SDL::Config->has('SDL_image');
-diag "Has SDL_ttf = " . SDL::Config->has('SDL_ttf');
-diag "Has SDL_gfx_framerate = " . SDL::Config->has('SDL_gfx_framerate');
-diag "Has SDL_gfx_imagefilter = " . SDL::Config->has('SDL_gfx_imagefilter');
-diag "Has SDL_gfx_primitives = " . SDL::Config->has('SDL_gfx_primitives');
-diag "Has SDL_gfx_rotozoom = " . SDL::Config->has('SDL_gfx_rotozoom');
-diag "Has SDL_net = " . SDL::Config->has('SDL_net');
-diag "Has SDL_Pango = " . SDL::Config->has('SDL_Pango');
-diag "Has SDL_sound = " . SDL::Config->has('SDL_sound');
-diag "Has smpeg = " . SDL::Config->has('smpeg');
-diag "Has png = " . SDL::Config->has('png');
-diag "Has jpeg = " . SDL::Config->has('jpeg');
+print "Testing SDL::Config\n";
+print "Has SDL = " . SDL::Config->has('SDL') . "\n";
+print "Has SDL_mixer = " . SDL::Config->has('SDL_mixer') . "\n";
+print "Has SDL_image = " . SDL::Config->has('SDL_image') . "\n";
+print "Has SDL_ttf = " . SDL::Config->has('SDL_ttf') . "\n";
+print "Has SDL_gfx_framerate = " . SDL::Config->has('SDL_gfx_framerate') . "\n";
+print "Has SDL_gfx_imagefilter = " . SDL::Config->has('SDL_gfx_imagefilter') . "\n";
+print "Has SDL_gfx_primitives = " . SDL::Config->has('SDL_gfx_primitives') . "\n";
+print "Has SDL_gfx_rotozoom = " . SDL::Config->has('SDL_gfx_rotozoom') . "\n";
+print "Has SDL_net = " . SDL::Config->has('SDL_net') . "\n";
+print "Has SDL_Pango = " . SDL::Config->has('SDL_Pango') . "\n";
+print "Has SDL_sound = " . SDL::Config->has('SDL_sound') . "\n";
+print "Has smpeg = " . SDL::Config->has('smpeg') . "\n";
+print "Has png = " . SDL::Config->has('png') . "\n";
+print "Has jpeg = " . SDL::Config->has('jpeg') . "\n";
# we assume that the following are always present
is( SDL::Config->has('SDL'), 1 );
View
4 t/core.t
@@ -33,7 +33,7 @@ can_ok ('SDL', @done);
my $v = SDL::linked_version();
isa_ok($v, 'SDL::Version', '[linked_version]');
-diag sprintf("got version: %d.%d.%d", $v->major, $v->minor, $v->patch);
+printf("got version: %d.%d.%d\n", $v->major, $v->minor, $v->patch);
my $display = SDL::Video::set_video_mode(640,480,232, SDL_SWSURFACE );
@@ -69,7 +69,7 @@ TODO:
local $TODO = $why;
pass "\nThe following functions:\n".join ",", @left;
}
-if( $done[0] eq 'none'){ diag '0% done 0/'.$#left } else { diag $why}
+if( $done[0] eq 'none'){ print '0% done 0/'.$#left."\n" } else { print "$why\n" }
pass 'Are we still alive? Checking for segfaults';
sleep(2);
View
2  t/core_audio.t
@@ -91,7 +91,7 @@ TODO:
fail "Not Implmented $_" foreach (@left)
}
-diag $why;
+print "$why\n";
sleep(1);
sub audio_callback
View
18 t/core_audiospec.t
@@ -11,11 +11,10 @@ use Devel::Peek;
use lib 't/lib';
use SDL::TestTool;
-unless ( $ENV{AUTOMATED_TESTING} or $ENV{RELEASE_TESTING} ) {
+unless ( $ENV{AUTOMATED_TESTING} or $ENV{SDL_RELEASE_TESTING} ) {
plan( skip_all => "author tests not required for installation" );
}
-
if ( !SDL::TestTool->init(SDL_INIT_AUDIO) ) {
plan( skip_all => 'Failed to init sound' );
}
@@ -46,17 +45,14 @@ sub callback{
$f = 1;
}
}
+}
+die 'AudioMixer, Unable to open audio: '. SDL::get_error() if( SDL::Audio::open($desired, $obtained) <0 );
-} die 'AudioMixer, Unable to open audio: '. SDL::get_error() if( SDL::Audio::open($desired, $obtained) <0 );
-
-
- SDL::Audio::pause(0);
-
- sleep(1);
-
- SDL::Audio::close();
+SDL::Audio::pause(0);
- isnt $p, 0, '[callback] tested ';
+sleep(1);
+SDL::Audio::close();
+isnt $p, 0, '[callback] tested ';
View
2  t/core_cd.t
@@ -34,7 +34,7 @@ TODO:
fail "Not Implmented $_" foreach(@left)
}
-diag $why;
+print "$why\n";
done_testing;
sleep(2);
View
2  t/core_joystick.t
@@ -47,7 +47,7 @@ TODO:
fail "Not Implmented $_" foreach(@left)
}
-diag $why;
+print "$why\n";
done_testing();
sleep(2);
View
2  t/core_mouse.t
@@ -34,7 +34,7 @@ TODO:
fail "Not Implmented $_" foreach(@left)
}
-diag $why;
+print "$why\n";
done_testing;
sleep(2);
View
2  t/core_multi.t
@@ -48,7 +48,7 @@ TODO:
local $TODO = $why;
pass "\nThe following functions:\n".join ",", @left;
}
- if( $done[0] eq 'none'){ diag '0% done 0/'.$#left } else { diag $why}
+ if( $done[0] eq 'none'){ print '0% done 0/'.$#left."\n" } else { print "$why\n" }
pass 'Are we still alive? Checking for segfaults';
View
2  t/core_rwops.t
@@ -59,7 +59,7 @@ TODO:
fail "Not Implmented $_" foreach(@left)
}
-diag $why;
+print "$why\n";
done_testing;
sleep(2);
View
3  t/core_timer.t
@@ -55,5 +55,6 @@ TODO:
local $TODO = $why;
pass "\nThe following functions:\n" . join ",", @left;
}
-diag $why;
+print "$why\n";
+
sleep(2);
View
2  t/gfx.t
@@ -17,7 +17,7 @@ if( !SDL::Config->has('SDL_gfx_primitives') )
my $v = SDL::GFX::linked_version();
isa_ok($v, 'SDL::Version', '[linked_version]');
-diag sprintf("got version: %d.%d.%d", $v->major, $v->minor, $v->patch);
+printf("got version: %d.%d.%d\n", $v->major, $v->minor, $v->patch);
pass 'Are we still alive? Checking for segfaults';
View
2  t/gfx_fpsmanager.t
@@ -27,7 +27,7 @@ else
my $v = SDL::GFX::linked_version();
isa_ok($v, 'SDL::Version', '[linked_version]');
-diag sprintf("got version: %d.%d.%d", $v->major, $v->minor, $v->patch);
+printf("got version: %d.%d.%d\n", $v->major, $v->minor, $v->patch);
my $fps = SDL::GFX::FPSManager->new(0, 0, 0, 0);
View
2  t/gfx_framerate.t
@@ -27,7 +27,7 @@ else
my $v = SDL::GFX::linked_version();
isa_ok($v, 'SDL::Version', '[linked_version]');
-diag sprintf("got version: %d.%d.%d", $v->major, $v->minor, $v->patch);
+printf("got version: %d.%d.%d\n", $v->major, $v->minor, $v->patch);
# init
my $fps = SDL::GFX::FPSManager->new(0, 0, 0, 0);
View
4 t/gfx_imagefilter.t
@@ -29,7 +29,7 @@ else
my $v = SDL::GFX::linked_version();
isa_ok($v, 'SDL::Version', '[linked_version]');
-diag sprintf("got version: %d.%d.%d", $v->major, $v->minor, $v->patch);
+printf("got version: %d.%d.%d\n", $v->major, $v->minor, $v->patch);
my @done =qw/
MMX_detect
@@ -147,7 +147,7 @@ TODO:
local $TODO = $why;
pass "\nThe following functions:\n".join ",", @left;
}
-if( $done[0] eq 'none'){ diag '0% done 0/'.$#left } else { diag $why}
+if( $done[0] eq 'none'){ print '0% done 0/'.$#left."\n" } else { print "$why\n" }
pass 'Are we still alive? Checking for segfaults';
View
2  t/gfx_primitives.t
@@ -25,7 +25,7 @@ elsif( !SDL::Config->has('SDL_gfx_primitives') )
my $v = SDL::GFX::linked_version();
isa_ok($v, 'SDL::Version', '[linked_version]');
-diag sprintf("got version: %d.%d.%d", $v->major, $v->minor, $v->patch);
+printf("got version: %d.%d.%d\n", $v->major, $v->minor, $v->patch);
my $display = SDL::Video::set_video_mode(640,480,32, SDL_SWSURFACE );
my $pixel = SDL::Video::map_RGB( $display->format, 0, 0, 0 );
View
2  t/gfx_primitives2.t
@@ -25,7 +25,7 @@ elsif( !SDL::Config->has('SDL_gfx_primitives') )
my $v = SDL::GFX::linked_version();
isa_ok($v, 'SDL::Version', '[linked_version]');
-diag sprintf("got version: %d.%d.%d", $v->major, $v->minor, $v->patch);
+printf("got version: %d.%d.%d\n", $v->major, $v->minor, $v->patch);
my $display = SDL::Video::set_video_mode(640,480,32, SDL_SWSURFACE );
my $pixel = SDL::Video::map_RGB( $display->format, 0, 0, 0 );
View
2  t/gfx_rotozoom.t
@@ -29,7 +29,7 @@ else
my $v = SDL::GFX::linked_version();
isa_ok($v, 'SDL::Version', '[linked_version]');
-diag sprintf("got version: %d.%d.%d", $v->major, $v->minor, $v->patch);
+printf("got version: %d.%d.%d\n", $v->major, $v->minor, $v->patch);
my $display = SDL::Video::set_video_mode(640,480,32, SDL_SWSURFACE );
my $pixel = SDL::Video::map_RGB( $display->format, 0, 0, 0 );
View
2  t/image.t
@@ -50,7 +50,7 @@ can_ok("SDL::Image", @done);
my $lver = SDL::Image::linked_version();
isa_ok($lver, "SDL::Version", '[linked_version] got version back!' );
-diag sprintf("got version: %d.%d.%d", $lver->major, $lver->minor, $lver->patch);
+printf("got version: %d.%d.%d\n", $lver->major, $lver->minor, $lver->patch);
isa_ok( SDL::Image::load("test/data/highlight.png"), "SDL::Surface", "[load] Gets Surface");
View
4 t/mixer.t
@@ -29,7 +29,7 @@ use SDL::Version;
my $v = SDL::Mixer::linked_version();
isa_ok($v, 'SDL::Version', '[linked_version]');
-diag sprintf("got version: %d.%d.%d", $v->major, $v->minor, $v->patch);
+printf("got version: %d.%d.%d\n", $v->major, $v->minor, $v->patch);
SKIP:
{
@@ -40,7 +40,7 @@ SKIP:
{
my $f = $flags[$_];
my $n = $names[$_];
- ( SDL::Mixer::init($f) != $f) ? diag "Tried to init $n". SDL::get_error() : diag "You have $n support";
+ ( SDL::Mixer::init($f) != $f) ? print "Tried to init $n". SDL::get_error() . "\n" : print "You have $n support\n";
pass 'Init ran';
}
}
View
2  t/mixer_channels.t
@@ -33,7 +33,7 @@ SDL::Mixer::Channels::channel_finished( $callback ); pass '[channel_finished] re
my $delay = 100;
my $audio_test_file = 'test/data/silence.wav';
-if($ENV{'RELEASE_TESTING'})
+if($ENV{'SDL_RELEASE_TESTING'})
{
SDL::Mixer::Channels::volume( -1, 10 );
is( SDL::Mixer::Channels::volume( -1, 20 ), 10, "[volume] set to 20, previously was 10" );
View
2  t/mixer_groups.t
@@ -30,7 +30,7 @@ is( SDL::Mixer::Groups::reserve_channels( 4 ), 4, "[r
my $delay = 100;
my $audio_test_file = 'test/data/silence.wav';
-if($ENV{'RELEASE_TESTING'})
+if($ENV{'SDL_RELEASE_TESTING'})
{
SDL::Mixer::Channels::volume( -1, 10 );
is( SDL::Mixer::Channels::volume( -1, 20 ), 10, "[volume] set to 20, previously was 10" );
View
2  t/mixer_music.t
@@ -52,7 +52,7 @@ my $audio_test_file = 'test/data/silence.wav';
my $volume1 = 2;
my $volume2 = 1;
-if($ENV{'RELEASE_TESTING'})
+if($ENV{'SDL_RELEASE_TESTING'})
{
$delay = 2000;
$audio_test_file = 'test/data/sample.wav';
View
4 t/mixer_samples.t
@@ -45,7 +45,7 @@ quick_load_RAW
SDL::Mixer::open_audio( 44100, SDL::Constants::AUDIO_S16, 2, 4096 );
my $version = SDL::Mixer::linked_version();
-diag sprintf("got version: %d.%d.%d", $version->major, $version->minor, $version->patch);
+printf("got version: %d.%d.%d\n", $version->major, $version->minor, $version->patch);
SKIP:
{
@@ -79,7 +79,7 @@ TODO:
fail "Not Implmented SDL::Mixer::*::$_" foreach(@left);
}
-diag $why;
+print "$why\n";
pass 'Checking for segfaults';
View
2  t/ttf.t
@@ -31,7 +31,7 @@ my $cv = SDL::TTF::compile_time_version();
isa_ok($lv, 'SDL::Version', '[linked_version] returns a SDL::Version object');
isa_ok($cv, 'SDL::Version', '[compile_time_version] returns a SDL::Version object');
-diag sprintf("got version: %d.%d.%d/%d.%d.%d", $lv->major, $lv->minor, $lv->patch, $cv->major, $cv->minor, $cv->patch);
+printf("got version: %d.%d.%d/%d.%d.%d\n", $lv->major, $lv->minor, $lv->patch, $cv->major, $cv->minor, $cv->patch);
is( TTF_HINTING_NORMAL, 0, 'TTF_HINTING_NORMAL should be imported' );
is( TTF_HINTING_NORMAL(), 0, 'TTF_HINTING_NORMAL() should also be available' );
View
2  t/ttf_font.t
@@ -24,7 +24,7 @@ my $cv = SDL::TTF::compile_time_version();
isa_ok($lv, 'SDL::Version', '[linked_version] returns a SDL::Version object');
isa_ok($cv, 'SDL::Version', '[compile_time_version] returns a SDL::Version object');
-diag sprintf("got version: %d.%d.%d/%d.%d.%d", $lv->major, $lv->minor, $lv->patch, $cv->major, $cv->minor, $cv->patch);
+printf("got version: %d.%d.%d/%d.%d.%d\n", $lv->major, $lv->minor, $lv->patch, $cv->major, $cv->minor, $cv->patch);
is( SDL::TTF::init(), 0, "[init] succeeded" );
Please sign in to comment.
Something went wrong with that request. Please try again.