Branch Coverage

blib/lib/Math/Logic.pm
Criterion Covered Total %
branch 153 168 91.0


line true false branch
97 211 39 unless ref $comp
98 1 248 if $err = $self->incompatible($comp)
115 15 0 if (defined $arg[0])
118 1 14 if $arg[0] =~ /^-?[tT]/o
119 1 14 if $arg[0] =~ /^-?[fF]/o
120 2 13 if $arg[0] =~ /^-?[uU]/o
122 1 1 $arg[2] =~ /^-?[tTpP1]/o ? :
2 13 if defined $arg[2]
137 451 54 ref $self ? :
150 451 54 if (defined $object)
151 239 212 unless exists $arg{'-value'}
153 451 0 unless exists $arg{'-degree'}
155 448 3 unless exists $arg{'-propagate'}
160 132 373 $$self{'-propagate'} ? :
162 1 504 unless $$self{'-degree'} =~ /^\d+$/o
164 0 505 if $$self{'-degree'} < $MIN_DEGREE
167 2 503 unless defined $$self{'-value'} and $$self{'-value'} =~ /^(?:\d+|-1)$/o
170 74 431 if ($$self{'-degree'} == 2) { }
279 152 elsif ($$self{'-degree'} == 3) { }
171 39 35 $$self{'-value'} && $$self{'-value'} != $Math::Logic::UNDEF ? :
177 170 109 if ($$self{'-value'} != $Math::Logic::UNDEF)
178 83 87 $$self{'-value'} ? :
182 1 151 if $$self{'-value'} == $Math::Logic::UNDEF
183 0 152 if $$self{'-value'} > $$self{'-degree'}
240 238 1347 if (defined $value)
243 29 209 if ($self->degree == 2) { }
121 88 elsif ($self->degree == 3) { }
244 14 15 $value && $value != $Math::Logic::UNDEF ? :
247 89 32 $value ? :
248 57 64 if $value == $Math::Logic::UNDEF
255 0 88 unless $value =~ /^\d+$/o
256 0 88 if $result > $self->degree
270 0 3943 if @_
280 0 1452 if @_
282 842 610 $self->degree == 3 ? :
291 0 460 unless ref $comp and $comp->can('degree') and $comp->can('propagate')
297 449 8 $self->degree == $comp->degree && $self->propagate == $comp->propagate ? :
311 0 0 unless ref $comp and $comp->can('degree') and $comp->can('propagate')
316 0 0 if $self->degree == $comp->degree
325 18 15 unless $full eq '1' or $full eq '-full'
329 4 29 if ($self->degree == 2) { }
13 16 elsif ($self->degree == 3) { }
330 2 2 $self->value ? :
333 8 5 $self->value ? :
334 4 9 if $self->value == $Math::Logic::UNDEF
337 5 11 if ($self->value == $Math::Logic::FALSE) { }
3 8 elsif ($self->value == $self->degree) { }
345 4 4 if $self->degree == 100 and $full
350 4 11 $self->propagate ? :
15 18 if $full
362 1 81 unless ref $comp
363 3 79 if $err = $self->incompatible($comp)
368 9 70 if ($self->degree == 2) { }
36 34 elsif ($self->degree == 3) { }
369 2 7 $self->value && $comp->value ? :
372 18 18 if ($self->propagate) { }
373 10 8 if ($self->value == $Math::Logic::UNDEF or $comp->value == $Math::Logic::UNDEF) { }
2 6 elsif ($self->value == $Math::Logic::TRUE and $comp->value == $Math::Logic::TRUE) { }
387 2 16 if ($self->value == $Math::Logic::TRUE and $comp->value == $Math::Logic::TRUE) { }
10 6 elsif ($self->value == $Math::Logic::FALSE or $comp->value == $Math::Logic::FALSE) { }
403 12 22 $self->value < $comp->value ? :
417 0 68 unless ref $comp
418 1 66 if $err = $self->incompatible($comp)
423 8 58 if ($self->degree == 2) { }
36 22 elsif ($self->degree == 3) { }
424 6 2 $self->value || $comp->value ? :
427 18 18 if ($self->propagate) { }
428 10 8 if ($self->value == $Math::Logic::UNDEF or $comp->value == $Math::Logic::UNDEF) { }
6 2 elsif ($self->value == $Math::Logic::TRUE or $comp->value == $Math::Logic::TRUE) { }
442 10 8 if ($self->value == $Math::Logic::TRUE or $comp->value == $Math::Logic::TRUE) { }
2 6 elsif ($self->value == $Math::Logic::FALSE and $comp->value == $Math::Logic::FALSE) { }
458 4 18 $self->value > $comp->value ? :
472 0 58 unless ref $comp
473 1 56 if $err = $self->incompatible($comp)
478 8 48 if ($self->degree == 2) { }
36 12 elsif ($self->degree == 3) { }
479 4 4 ($self->value xor $comp->value) ? :
483 20 16 if ($self->value == $Math::Logic::UNDEF or $comp->value == $Math::Logic::UNDEF) { }
8 8 elsif ($self->value == $comp->value) { }
518 4 32 if ($self->degree == 2) { }
12 20 elsif ($self->degree == 3) { }
519 2 2 $self->value ? :
523 4 8 if ($self->value == $Math::Logic::UNDEF) { }
4 4 elsif ($self->value == $Math::Logic::TRUE) { }