File: leaktrace.t

package info (click to toggle)
libgeo-distance-xs-perl 0.13-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 256 kB
  • ctags: 763
  • sloc: ansic: 3,222; perl: 134; makefile: 11
file content (18 lines) | stat: -rw-r--r-- 359 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use strict;
use warnings;
use Geo::Distance::XS;
use Test::More;

eval "use Test::LeakTrace; 1" or do {
    plan skip_all => 'Test::LeakTrace is not installed.';
};
plan tests => 1;

my $try = sub {
    my $geo = Geo::Distance->new;
    $geo->distance(mile => -118.243103, 34.159545, -73.987427, 40.853293);
};

$try->();

is(leaked_count($try), 0, 'leaks');