PageRenderTime 24ms CodeModel.GetById 16ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/t/00-load.t

http://github.com/PerlGameDev/SDL
Unknown | 114 lines | 89 code | 25 blank | 0 comment | 0 complexity | a9575d8398ecc9f0dd1631b309dc8a8b MD5 | raw file
  1use strict;
  2use warnings;
  3use Test::Most 'bail';
  4use File::Spec 'catfile';
  5
  6BEGIN {
  7	my @modules = qw /
  8		SDL
  9		SDL::Video
 10		SDL::Color
 11		SDL::Surface
 12		SDL::Config
 13		SDL::Overlay
 14		SDL::Rect
 15		SDL::Time
 16		SDL::Events
 17		SDL::Event
 18		SDL::Mouse
 19		SDL::Joystick
 20		SDL::Cursor
 21		SDL::Audio
 22		SDL::AudioCVT
 23		SDL::AudioSpec
 24		SDL::CDROM
 25		SDL::CDTrack
 26		SDL::CD
 27		SDL::MultiThread
 28		SDL::PixelFormat
 29		SDL::VideoInfo
 30
 31		SDL::GFX::BlitFunc
 32		SDL::GFX::Framerate
 33		SDL::GFX::FPSManager
 34		SDL::GFX::ImageFilter
 35		SDL::GFX::Primitives
 36		SDL::GFX::Rotozoom
 37
 38		SDL::Image
 39
 40		SDL::Mixer
 41		SDL::Mixer::Samples
 42		SDL::Mixer::Channels
 43		SDL::Mixer::Groups
 44		SDL::Mixer::Music
 45		SDL::Mixer::Effects
 46		SDL::Mixer::MixChunk
 47		SDL::Mixer::MixMusic
 48
 49		SDL::Pango
 50		SDL::Pango::Context
 51
 52		SDL::TTF
 53		SDL::TTF::Font
 54
 55		SDL::Version
 56
 57		SDLx::App
 58		SDLx::Sprite
 59		SDLx::Sprite::Animated
 60		SDLx::FPS
 61		SDLx::SFont
 62		SDLx::Validate
 63		SDLx::Surface
 64		SDLx::Surface::TiedMatrix
 65		SDLx::Surface::TiedMatrixRow
 66
 67		SDLx::Controller
 68		SDLx::Controller::Interface
 69		SDLx::Controller::State
 70		SDLx::Controller::Timer
 71
 72		SDLx::Sound
 73
 74		/;
 75
 76	my $tests = scalar @modules;
 77
 78	my $load_test_strict = 0;
 79
 80	if( $ENV{RELEASE_TESTING})
 81	{
 82
 83		eval 'require Test::Strict';
 84		$load_test_strict = 1 unless $@;
 85	}
 86	foreach( @modules )
 87	{
 88		use_ok $_ ;
 89		if( $load_test_strict )
 90		{
 91
 92
 93			my $file = $_;
 94
 95			my @files = split /::/, $file;
 96
 97			$file = File::Spec->catfile( 'lib', @files );
 98
 99			$file = $file.'.pm';
100
101			eval 'Test::Strict::syntax_ok $file';
102			pass unless $@;	
103			eval 'Test::Stict::strict_ok $file';
104			pass unless $@;
105			eval 'Test::Strict::warnings_ok $file';
106			pass unless $@;
107
108		}
109	}
110
111
112}
113
114done_testing();