Commit | Line | Data |
c37bd817 |
1 | #!perl |
2 | use strict; |
3 | use warnings; |
4 | use Test::More; |
5 | use SDL; |
6 | |
7 | |
b175f397 |
8 | # Don't run tests for installs |
9 | use Test::More; |
10 | unless ( $ENV{AUTOMATED_TESTING} or $ENV{RELEASE_TESTING} ) { |
11 | plan( skip_all => "Author tests not required for installation" ); |
12 | } |
13 | |
c37bd817 |
14 | sub overlay_leak() |
15 | { |
16 | |
17 | SDL::Init(SDL_INIT_VIDEO); |
18 | |
19 | my $display = SDL::SetVideoMode(640,480,32, SDL_SWSURFACE ); |
20 | |
21 | my $overlay = SDL::Overlay->new( 100, 100, SDL_YV12_OVERLAY, $display); |
22 | |
23 | $overlay = undef; |
24 | |
25 | $display = undef; |
26 | |
27 | } |
28 | |
29 | |
30 | eval 'use Test::Valgrind'; |
31 | plan skip_all => 'Test::Valgrind is required to test your distribution with valgrind' if $@; |
32 | |
33 | overlay_leak(); |
34 | |
35 | |
36 | |