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