Branch Coverage

blib/lib/Set/Infinite/Basic.pm
Criterion Covered Total %
branch 182 276 65.9


line true false branch
36 30072 14 if $#_ == 0
37 14 0 if @_
62 215 0 if ($cmp < 0) { }
0 0 elsif ($cmp > 0) { }
75 0 215 if ($cmp > 0) { }
214 1 elsif ($cmp < 0) { }
88 212 1 if $cmp > 0 or $cmp == 0 and $open_beg || $open_end
97 9 1243 if ($$self{'b'} == $Set::Infinite::Basic::inf)
98 1 8 if $$self{'a'} == $Set::Infinite::Basic::neg_inf
104 9 1234 if ($$self{'a'} == $Set::Infinite::Basic::neg_inf)
126 3 2054 if ($tolerance) { }
128 0 3 $$tmp1{'open_begin'} ? :
129 0 3 $$tmp1{'open_end'} ? :
130 0 3 $$tmp2{'open_begin'} ? :
131 0 3 $$tmp2{'open_end'} ? :
133 2 1 if ($$tmp1{'b'} + $$tmp1{'b'} + $b1_open < $$tmp2{'a'} + $$tmp2{'a'} - $a2_open)
138 0 1 if ($$tmp1{'a'} + $$tmp1{'a'} - $a1_open > $$tmp2{'b'} + $$tmp2{'b'} + $b2_open)
147 208 1264 if ($cmp < 0 or $cmp == 0 and $$tmp1{'open_end'} and $$tmp2{'open_begin'})
152 219 945 if ($cmp > 0 or $cmp == 0 and $$tmp2{'open_end'} and $$tmp1{'open_begin'})
160 305 1323 if ($cmp > 0) { }
1314 9 elsif ($cmp == 0) { }
166 0 1314 $$tmp1{'open_begin'} ? :
174 631 997 if ($cmp < 0) { }
652 345 elsif ($cmp == 0) { }
180 2 650 $$tmp1{'open_end'} ? :
193 0 75 if ($inverted)
195 0 0 if $cmp
197 0 0 if $cmp
199 0 0 if $cmp
203 47 28 if $cmp
205 0 28 if $cmp
207 2 26 if $cmp
214 0 8034 if ($type)
215 0 0 if (ref $tmp ne $type)
218 0 0 if (ref $tmp2 ne $type)
222 0 8034 if ($tmp > $tmp2)
234 0 7687 unless defined $self
235 47 7640 if $$self{'a'} == -$Set::Infinite::Basic::inf
236 38 7649 if $$self{'b'} == $Set::Infinite::Basic::inf
238 0 7687 if UNIVERSAL::can($tmp1, 'datetime')
241 0 7687 if UNIVERSAL::can($tmp2, 'datetime')
243 4637 3050 if $tmp1 eq $tmp2
244 76 2974 $$self{'open_begin'} ? :
246 1604 1446 $$self{'open_end'} ? :
255 2553 0 unless (@_)
256 2009 544 ref $self ? :
260 0 0 if $@
261 0 0 if (ref $self) { }
285 2009 0 unless $type
287 0 0 unless ref $$_{'a'} eq $type
288 0 0 unless ref $$_{'b'} eq $type
295 0 0 unless $$self{'fixtype'}
309 0 557 if (exists $$self{'first'})
310 0 0 wantarray ? :
312 0 557 unless (@{$$self{'list'};})
313 0 0 wantarray ? :
316 22 535 unless wantarray
319 495 40 if $res->is_null
325 0 309 if (exists $$self{'last'})
326 0 0 wantarray ? :
328 0 309 unless (@{$$self{'list'};})
329 0 0 wantarray ? :
332 12 297 unless wantarray
335 290 7 if $res->is_null
340 718 855 @{$_[0]{'list'};} ? :
352 0 0 $#{$_[0]{'list'};} == 0 ? :
356 0 0 $#{$_[0]{'list'};} == 0 && $_[0]{'list'}[0]{'a'} == $_[0]{'list'}[0]{'b'} ? :
363 0 0 if (ref $_[0] eq ref $a1) { }
375 0 0 if (ref $_[0] eq ref $a1) { }
383 0 0 unless $contains
386 0 0 if not defined $equal or $equal
393 0 0 if defined $intersects
405 1980 0 if @tmp
413 2570 0 ref $_[0] eq ref $a1 ? :
419 3425 0 ref $_[0] eq ref $a1 ? :
425 8 0 ref $_[0] eq ref $a1 ? :
442 1181 4822 if ($na < $#{$$b1{'list'};})
456 1819 5848 if ($tmp1b < $tmp2a)
461 354 5494 if ($tmp1a > $tmp2b)
466 1666 3828 if ($cmp1 < 0) { }
1893 1935 elsif ($cmp1) { }
478 1316 4178 if ($cmp2 > 0) { }
2495 1683 elsif ($cmp2) { }
489 79 1025 if ($tmp1a <= $tmp1b and $tmp1a != $tmp1b || !($open_beg || $open_end) || $tmp1a == $Set::Infinite::Basic::inf || $tmp1a == $Set::Infinite::Basic::neg_inf)
497 2519 1950 if ($op eq 'intersection')
503 1926 2543 if ($op eq 'intersects')
507 24 2519 if ($op eq 'intersected_spans')
517 1499 2578 if $op eq 'intersects'
527 0 1174 if (@_)
529 0 0 if (ref $_[0] eq ref $self) { }
538 1 1173 unless (@{$$self{'list'};})
556 111 0 if (ref $_[0] eq ref $a1) { }
565 2 109 unless (defined $b1_min[0])
568 19 90 unless (defined $a1_max[0])
581 37 114 if ($end <= $begin)
600 7 83 if ($ia <= $#{$$a1{'list'};} and $$a1{'list'}[$ia]{'a'} >= $last)
628 3300 0 if (ref $_[0] eq ref $a1) { }
635 1630 1670 if ($#{$$a1{'list'};} < 0)
638 2 1668 if ($#{$$b1{'list'};} < 0)
643 0 1668 unless (defined $b1_min[0])
646 0 1668 unless (defined $a1_max[0])
657 42 1626 if ($b1_min[0] > $a1_max[0])
667 1623 426 if ($#tmp == 0)
671 1412 215 if $ia >= $#{$$a1{'list'};}
672 211 1 unless _simple_intersects($$a1{'list'}[$ia], $$a1{'list'}[$ia + 1]) or $is_real and $$a1{'list'}[$ia]{'b'} == $$a1{'list'}[$ia + 1]{'a'}
676 0 4 unless @tmp == 1
683 207 219 if ($$a1{'list'}[$ia]{'a'} >= $$b_list[$ib]{'a'})
702 0 0 $b1 == $a1 ? :
711 5865 14229 if (ref $$self{$key} eq 'ARRAY') { }
727 31970 544 if (ref $class) { }
736 0 544 $Set::Infinite::Basic::tolerance ? :
544 0 $Set::Infinite::Basic::fixtype ? :
747 7911 4710 if ($ref)
748 96 7815 if ($ref eq 'ARRAY')
754 6103 1712 if ($ref eq 'HASH')
758 1712 0 if ($tmp->isa('Set::Infinite::Basic'))
763 2053 2657 if (@_) { }
789 0 1 if (ref $_[0] eq ref $a1) { }
808 0 7299 if exists $$self{'min'}
809 72 7227 unless @{$$self{'list'};}
812 5 7222 if ($tmp2 and $$self{'tolerance'})
825 0 6659 if exists $$self{'max'}
826 88 6571 unless @{$$self{'list'};}
829 8 6563 if ($tmp2 and $$self{'tolerance'})
844 3 9 if ($size) { }
850 5 7 if ($$self{'tolerance'})
851 4 1 unless $$_{'open_end'}
852 0 5 if $$_{'open_begin'}
853 1 4 if $$_{'open_end'}
863 0 1016 unless defined $min[0] and defined $max[0]
872 0 72 if ($inverted)
877 0 75 if ($_ > $#{$$tmp2{'list'};})
882 49 26 if $cmp
884 21 2 $#{$$tmp1{'list'};} == $#{$$tmp2{'list'};} ? :
890 13 0 if (ref $self)
892 0 13 unless defined $tmp
903 1 3 if ($#tmp == 0) { }
915 0 0 if defined $tmp