blib/lib/App/RecordStream/Test/Aggregator/ArrayHelper.pm

filter: Statementstmt 100% 22 / 22 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 1 totaltotal 96.7% 30 / 31 CC 3 SCAR 5.6
CC
3
Cov
100%
array_agg_ok
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.8
« blib/lib/App/RecordStream/Executor/Getopt.pm ↑ Summary blib/lib/App/RecordStream/Aggregator/Maximum.pm »
1 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package App::RecordStream::Test::Aggregator::ArrayHelper;
5 2 ▶use App::RecordStream::Record;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use Test::More ();
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use base 'Exporter';
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 our @EXPORT = qw< array_agg_ok >;
10  
11 sub array_agg_ok {
12 8 ▶ my ($aggr, $input, $expected, $desc) = @_;
Subroutine array_agg_ok: called CC=3 SCAR=11.0
Pod undocumented
13  
14 8 ▶ $aggr = "App::RecordStream::Aggregator::$aggr"->new("x")
Branch: 1 branch
BranchTrueFalseTotal
unless ref $aggr 2 6 8
15 unless ref $aggr;
16  
17 8 my $cookie = $aggr->initial();
18 $cookie = $aggr->combine($cookie, App::RecordStream::Record->new("x" => $_))
19 8 for @$input;
20  
21 8 local $Test::Builder::Level = $Test::Builder::Level + 1;
22  
23 8 Test::More::is_deeply($aggr->squish($cookie), $expected, $desc);
24 }
« blib/lib/App/RecordStream/Executor/Getopt.pm ↑ Summary blib/lib/App/RecordStream/Aggregator/Maximum.pm »