Branch Coverage

blib/lib/Time/ETA.pm
Criterion Covered Total %
branch 60 60 100.0


line true false branch
28 1 22 unless defined $params{'milestones'}
29 15 7 unless $self->_is_positive_integer($params{'milestones'})
46 16 44 if ($self->is_completed) { }
68 4 61 unless $self->can_calculate_eta
70 24 37 if $self->is_completed
106 56 121 $self->{'_passed_milestones'} == $self->{'_milestones'} ? :
115 13 8 if ($self->{'_passed_milestones'} < $self->{'_milestones'}) { }
125 2 11 if ($self->{'_passed_milestones'} == $self->{'_milestones'})
136 113 12 if ($self->{'_passed_milestones'} > 0) { }
147 1 3 if $self->is_paused
169 1 2 unless $self->is_paused
207 2 56 unless defined $string
215 2 54 if ($@)
219 2 52 if ref $data ne 'HASH'
221 2 50 unless defined $data->{'_version'}
225 4 46 if $data->{'_version'} ne $SERIALIZATION_API_VERSION
228 2 44 unless _is_positive_integer(undef, $data->{'_milestones'})
231 2 42 unless _is_positive_integer_or_zero(undef, $data->{'_passed_milestones'})
233 41 1 unless ($data->{'_is_paused'})
241 8 28 if (defined $data->{'_end'})
249 29 7 if (defined $data->{'_milestone_pass'})
280 3 10 if (not $@) { }
290 1 79 unless defined $params{'name'}
293 2 77 if ref $params{'value'} ne 'ARRAY'
296 2 75 unless _is_positive_integer_or_zero(undef, $params{'value'}[0])
299 2 73 unless _is_positive_integer_or_zero(undef, $params{'value'}[1])
307 1 271 unless defined $maybe_number
323 1 73 unless defined $maybe_number
325 2 71 if $maybe_number eq '0'
326 1 70 if $maybe_number eq '+0'