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