File: 02counts.t

package info (click to toggle)
libtest-memorygrowth-perl 0.05-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 124 kB
  • sloc: perl: 152; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 323 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/perl

use v5.14;
use warnings;

use Test2::V0;

use Test::MemoryGrowth;

my $count;

$count = 0;
no_growth { $count++ };
is( $count, 10010, '$count == 10010 after defaults' );

$count = 0;
no_growth { $count++ } burn_in => 5, calls => 5;
is( $count, 10, '$count == 10 after burn_in=5, calls=5' );

done_testing;