line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::RecordStream::Test::UniqConcatHelper; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
2338
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
49
|
|
4
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
42
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
9
|
use App::RecordStream::Record; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
205
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub test_aggregator |
9
|
|
|
|
|
|
|
{ |
10
|
4
|
|
|
4
|
0
|
49
|
my $aggr = shift; |
11
|
4
|
|
|
|
|
7
|
my $delim = shift; |
12
|
4
|
|
|
|
|
6
|
my $field = shift; |
13
|
|
|
|
|
|
|
|
14
|
4
|
|
|
|
|
17
|
my $cookie = $aggr->initial(); |
15
|
|
|
|
|
|
|
|
16
|
4
|
|
|
|
|
9
|
foreach my $n (1, 3, 3, 1, 2, 7) |
17
|
|
|
|
|
|
|
{ |
18
|
24
|
|
|
|
|
73
|
$cookie = $aggr->combine($cookie, App::RecordStream::Record->new("x" => $n)); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
4
|
|
|
|
|
25
|
my $value = $aggr->squish($cookie); |
22
|
|
|
|
|
|
|
|
23
|
4
|
|
|
|
|
21
|
Test::More::is($value, '1,2,3,7', "uniq concat of 1, 3, 3, 1, 2, 7"); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |