/xt/07_core_memleak.t

http://github.com/PerlGameDev/SDL · Perl · 23 lines · 14 code · 7 blank · 2 comment · 1 complexity · de1723ee9a7d2cc1795aa867288fec49 MD5 · raw file

  1. #!perl
  2. use strict;
  3. use warnings;
  4. use Test::More;
  5. use SDL;
  6. use SDL::Rect;
  7. # Don't run tests for installs
  8. use Test::More;
  9. sub leaky() {
  10. SDL::Rect->new( 0, 0, 10, 10 );
  11. }
  12. eval 'use Test::Valgrind';
  13. plan skip_all => 'Test::Valgrind is required to test your distribution with valgrind'
  14. if $@;
  15. leaky();
  16. sleep(2);