Instance/t/02-leaktest.t

filter: Statementstmt 100% 21 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 100% 26 / 26 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Instance/t/01-basic.t ↑ Summary blib/lib/AI/DecisionTree/Instance.pm »
1 #!/usr/bin/perl
2  
3 1 ▶use Test;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶BEGIN { plan tests => 4 }
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use AI::DecisionTree::Instance;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ok(1);
8  
9 1 my $x = 0;
10 {
11 1 ▶ local *{"AI::DecisionTree::Instance::DESTROY"} = sub { $x = 1 };
Subroutine __ANON__: called CC=1 SCAR=0.0
12 {
13 1 my $i = new AI::DecisionTree::Instance([3,4], 4, "foo");
14 1 ok $x, 0;
15 }
16 1 ok $x, 1;
17 }
18 1 ok $x, 1;
« Instance/t/01-basic.t ↑ Summary blib/lib/AI/DecisionTree/Instance.pm »