blib/lib/App/RecordStream/Test/UniqConcatHelper.pm

filter: Statementstmt 100% 18 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 95.6% 22 / 23 CC 2 SCAR 3.4
CC
2
Cov
100%
test_aggregator
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« blib/lib/App/RecordStream/DomainLanguage/Executor.pm ↑ Summary blib/lib/App/RecordStream/Aggregator/Percentile.pm »
1 package App::RecordStream::Test::UniqConcatHelper;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use App::RecordStream::Record;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 sub test_aggregator
9 {
10 4 ▶ my $aggr = shift;
Subroutine test_aggregator: called CC=2 SCAR=6.9
Pod undocumented
11 4 my $delim = shift;
12 4 my $field = shift;
13  
14 4 my $cookie = $aggr->initial();
15  
16 4 foreach my $n (1, 3, 3, 1, 2, 7)
17 {
18 24 $cookie = $aggr->combine($cookie, App::RecordStream::Record->new("x" => $n));
19 }
20  
21 4 my $value = $aggr->squish($cookie);
22  
23 4 Test::More::is($value, '1,2,3,7', "uniq concat of 1, 3, 3, 1, 2, 7");
24 }
25  
26 2 1;
« blib/lib/App/RecordStream/DomainLanguage/Executor.pm ↑ Summary blib/lib/App/RecordStream/Aggregator/Percentile.pm »