| line | stmt | bran | cond | sub | pod | time | code | 
| 1 | 2 |  |  | 2 |  | 2526 | use strict; | 
|  | 2 |  |  |  |  | 4 |  | 
|  | 2 |  |  |  |  | 104 |  | 
| 2 | 2 |  |  | 2 |  | 12 | use warnings; | 
|  | 2 |  |  |  |  | 3 |  | 
|  | 2 |  |  |  |  | 91 |  | 
| 3 |  |  |  |  |  |  |  | 
| 4 |  |  |  |  |  |  | package App::RecordStream::Test::Aggregator::ArrayHelper; | 
| 5 | 2 |  |  | 2 |  | 10 | use App::RecordStream::Record; | 
|  | 2 |  |  |  |  | 4 |  | 
|  | 2 |  |  |  |  | 33 |  | 
| 6 | 2 |  |  | 2 |  | 8 | use Test::More (); | 
|  | 2 |  |  |  |  | 4 |  | 
|  | 2 |  |  |  |  | 31 |  | 
| 7 | 2 |  |  | 2 |  | 7 | use base 'Exporter'; | 
|  | 2 |  |  |  |  | 4 |  | 
|  | 2 |  |  |  |  | 370 |  | 
| 8 |  |  |  |  |  |  |  | 
| 9 |  |  |  |  |  |  | our @EXPORT = qw< array_agg_ok >; | 
| 10 |  |  |  |  |  |  |  | 
| 11 |  |  |  |  |  |  | sub array_agg_ok { | 
| 12 | 8 |  |  | 8 | 0 | 1004 | my ($aggr, $input, $expected, $desc) = @_; | 
| 13 |  |  |  |  |  |  |  | 
| 14 | 8 | 100 |  |  |  | 64 | $aggr = "App::RecordStream::Aggregator::$aggr"->new("x") | 
| 15 |  |  |  |  |  |  | unless ref $aggr; | 
| 16 |  |  |  |  |  |  |  | 
| 17 | 8 |  |  |  |  | 47 | my $cookie = $aggr->initial(); | 
| 18 |  |  |  |  |  |  | $cookie = $aggr->combine($cookie, App::RecordStream::Record->new("x" => $_)) | 
| 19 | 8 |  |  |  |  | 52 | for @$input; | 
| 20 |  |  |  |  |  |  |  | 
| 21 | 8 |  |  |  |  | 24 | local $Test::Builder::Level = $Test::Builder::Level + 1; | 
| 22 |  |  |  |  |  |  |  | 
| 23 | 8 |  |  |  |  | 34 | Test::More::is_deeply($aggr->squish($cookie), $expected, $desc); | 
| 24 |  |  |  |  |  |  | } |