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