File: no_leaks_any.t

package info (click to toggle)
libtest2-suite-perl 0.000139-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,624 kB
  • sloc: perl: 6,398; makefile: 2
file content (17 lines) | stat: -rw-r--r-- 779 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use Test2::Bundle::Extended;
use Test2::Tools::Spec;
use Test2::Util qw/get_tid/;

my $x;

tests a => {mini => 1, async => 1, iso => 1}, sub { ok(!$x, "a $$ " . get_tid); $x = "a"};
tests b => {mini => 1, async => 1, iso => 1}, sub { ok(!$x, "b $$ " . get_tid); $x = "b"};
tests c => {mini => 1, async => 1, iso => 1}, sub { ok(!$x, "c $$ " . get_tid); $x = "c"};
tests d => {mini => 1, async => 1, iso => 1}, sub { ok(!$x, "d $$ " . get_tid); $x = "d"};
tests e => {mini => 1, async => 1, iso => 1}, sub { ok(!$x, "e $$ " . get_tid); $x = "e"};
tests f => {mini => 1, async => 1, iso => 1}, sub { ok(!$x, "f $$ " . get_tid); $x = "f"};
tests g => {mini => 1, async => 1, iso => 1}, sub { ok(!$x, "g $$ " . get_tid); $x = "g"};

done_testing;

die "Ooops, we leaked |$x|" if $x;