Branch Coverage

blib/lib/DateTime/Event/Recurrence.pm
Criterion Covered Total %
branch 105 128 82.0


line true false branch
20 21 38 unless $self->{'as_ical'}
37 14 0 if UNIVERSAL::can($self, 'get_ical')
38 13 1 if UNIVERSAL::can($_[0], 'get_ical')
40 0 14 if exists $op1{'exclude'} or exists $op2{'exclude'}
46 7 7 exists $op1{'include'} ? :
50 0 14 if (exists $op2{'include'}) { }
66 0 1 unless @_
70 1 0 if UNIVERSAL::can($self, 'get_ical')
71 0 1 if UNIVERSAL::can($_[0], 'get_ical')
72 0 1 if exists $op2{'exclude'}
78 1 0 exists $op1{'include'} ? :
82 0 1 exists $op1{'exclude'} ? :
85 0 1 if (exists $op2{'include'}) { }
177 301 17478 unless defined $$dur
521 16 12 if $base_unit eq 'years' and exists $args{'weeks'}
524 5 7 if $base_unit eq 'months' and exists $args{'weeks'}
529 18 45 if $week_start_day
531 18 27 $base eq 'years' ? :
45 18 unless defined $week_start_day
534 0 63 unless $DateTime::Event::Recurrence::weekdays_any{$week_start_day}
539 0 63 if $interval < 1
541 0 63 if $interval > 1
545 0 63 if defined $start and $start->is_infinite
549 0 63 if $start and $interval > 1
558 63 73 if ($base eq $DateTime::Event::Recurrence::units[$_])
566 0 21 if exists $args{'weeks'} and exists $args{'months'}
573 264 100 unless exists $args{$unit}
575 61 39 if (ref $args{$unit} eq 'ARRAY') { }
586 27 73 if ($unit eq 'days')
591 3 146 $_ =~ /[a-z]/ ? :
598 0 18 unless $a < 0 <=> $b < 0
603 1 99 if ($unit eq 'nanoseconds') { }
6 93 elsif ($base eq 'weeks' and $unit eq 'days') { }
614 6 0 exists $DateTime::Event::Recurrence::ical_days{$_} ? :
624 48 42 if ($unit eq 'months' or $unit eq 'weeks' or $unit eq 'days')
631 0 211 unless $_
633 174 37 if $_ > 0
640 428 3 if $_ < $DateTime::Event::Recurrence::limits{$unit}
643 16 11 if ($unit eq 'days' and $base_unit eq 'months' || $level_unit[-1] eq 'months')
649 137 1 if $_ < 31
653 10 17 if ($unit eq 'days' and $base_unit eq 'weeks' || $level_unit[-1] eq 'weeks')
660 10 0 if $_ < 7
673 1 99 unless @{$args{$unit};}
688 1 61 if keys %args
703 13 108 if (@positives and @negatives)
725 68 53 if ($i == $#duration) { }
761 13 61 defined $set ? :
777 34 3137 if $occurrence < 0
788 437 7122 if ($args->{'duration'}[$j][$i] < 0)
797 108 7451 if ($DateTime::Event::Recurrence::as_number{$args->{'level_unit'}[$j - 1]}($next, $args->{'week_start_day'}) != $DateTime::Event::Recurrence::as_number{$args->{'level_unit'}[$j - 1]}($previous, $args->{'week_start_day'}))
822 207 318 if $self->is_infinite
831 180 318 if $init
838 498 346 if ($end - $start < 3)
843 0 635 unless defined $next
844 318 317 if $next < $self
851 0 346 unless defined $next
853 189 157 if ($next < $self) { }
870 226 858 if $self->is_infinite
879 610 858 if $init
886 1467 426 if ($end - $start < 3)
891 34 1622 unless defined $next
892 857 765 if $next > $self
899 0 426 unless defined $next
901 212 214 if ($next > $self) { }