Branch Coverage

blib/lib/Aion/Type.pm
Criterion Covered Total %
branch 191 218 87.6


line true false branch
96 6352 480 if UNIVERSAL::isa($_, __PACKAGE__)
12 2635 if $self->{'args'} and &List::Util::first(sub { exists $_->{'is_param'} if UNIVERSAL::isa($_, __PACKAGE__); } , @{$$self{"args"};})
115 1624 11257 @args ? :
2615 12881 $self->is_exclude ? :
823 15496 $self->is_intersection ? :
841 16319 if ($self->is_union) { }
122 3 12 $self->{'message'} ? :
142 119 1029 if $i->is_set_theoretic
143 472 557 if $i->{'test'} != \&Aion::Type::true
159 1177 323 if ($self->{'as_test_cache'} //= $self->_build_as_test_cache) { }
162 47 1981 unless $Aion::Type::SELF->{'test'}->()
165 32 291 if $self->{'as'} and not $self->{'as'}->test
187 13 147 unless $self->test
196 27 7 if $coerce->[0]->test
248 270 228 UNIVERSAL::isa($_, __PACKAGE__) ? :
250 389 38 exists $self->{'args'} && @{$self->{'args'};} || exists $self->{'N'} || exists $self->{'M'} ? :
1020 427 $keyfn ? :
258 23 0 if (@_ > 1) { }
271 0 16 unless @as and $as[0] eq &Any()
294 5 11 if $x->{'name'} eq $name
295 3 8 if ($x->is_intersection) { }
1 7 elsif ($x->is_set_theoretic) { }
297 6 1 if $x->{'as'}
307 4 29 if $is_strict and $self eq $other or not $is_strict and $self->like($other)
310 2 27 if ($self->is_intersection)
313 3 24 if ($self->is_union)
316 0 24 if ($self->is_exclude)
317 0 0 $other->is_exclude ? :
319 22 2 if $self->{'as'}
327 0 34 if $self->is_intersection and $other->is_intersection
328 0 34 if $self->is_union and $other->is_union
329 0 34 if $self->is_exclude and $other->is_exclude
330 5 29 if $self->is_set_theoretic or $other->is_set_theoretic
338 66 159 if builtin::refaddr($self) == builtin::refaddr($other)
340 113 46 unless UNIVERSAL::isa($other, __PACKAGE__) and $self->{'coerce'} == $other->{'coerce'}
359 1 1 $self->_simplify eq &None() ? :
368 222 1197 if $i->is_set_theoretic
369 727 470 if $i->{'test'} != \&Aion::Type::true
372 201 246 @u == 1 ? :
2 447 if (@u == 0) { }
380 449 698 if ($self->is_exclude)
383 1 448 if $inner->is_exclude
385 30 418 if $inner->is_union
387 116 302 if $inner->is_intersection
389 25 277 if ($inner->is_range_type)
391 11 14 if ($inner->is_range)
392 0 11 if $min == "-Inf" and $max == "Inf"
393 0 11 if $min == "-Inf"
394 4 7 if $max == "Inf"
398 1 13 if $min == 0 and $max == "Inf"
399 8 5 if $min == 0
400 1 4 if $max == "Inf"
406 225 473 if $self->is_intersection
407 46 427 if $self->is_union
417 124 762 if ($self->is_intersection)
418 121 322 $x->is_union ? :
427 121 641 if $self->is_union
445 0 22 if ($max1 > $min2) { }
450 29 22 if (@ranges == 1)
452 0 29 if $min == $range->range_lbound and $max == "Inf"
463 0 1318 if 0 == grep(($_->{'args'}[0] <= $_->{'args'}[1]), @$ranges)
473 53 25 if $min2 > $max
485 3 0 unless @$exclude_enums
491 0 0 unless keys %exclude_enum
496 0 0 unless keys %exclude_enum
506 2 14 unless @$enums
513 1 2 unless keys %enum
518 8 5 unless keys %enum
530 1469 16908 if (exists $range_lbound{$addr}) { }
23 16885 elsif ($candidate->is_enum) { }
15 16870 elsif ($candidate->is_exclude and $candidate->{'args'}[0]->is_enum) { }
536 19 2666 @enums || @exclude_enums ? :
541 2731 5875 if ($_->is_intersection) { }
543 62 2216 if exists $x{&None()->key}
547 33 2183 if 1 == keys %x
549 1 2182 if 0 == keys %x
551 3004 3981 if $_->is_exclude
1194 988 if &List::Util::first(sub { exists $x{$_->{'args'}[0]->key} if $_->is_exclude; } , values %x)
557 78 2763 if ($_->is_union) { }
559 0 407 if exists $x{&Any()->key}
563 55 352 if 1 == keys %x
565 20 332 if 0 == keys %x
567 617 1242 if $_->is_exclude
0 332 if &List::Util::first(sub { exists $x{$_->{'args'}[0]->key} if $_->is_exclude; } , values %x)
575 13 50 if $self eq $other or $other eq &Any()
583 11 2 if $self->subset($other)
601 2 5 unless $self eq $other
627 0 0 if (@_ == 1) { }
637 0 0 if (@_ == 1) { }
647 0 0 if (@_ == 1) { }
660 1 332 if $self->{'init'}
669 1 331 if $@
679 211 8 $is_arg ? :
681 211 8 if ($is_arg)
682 145 66 $self->{'init'} ? :
688 0 211 if $@
697 1 7 if $@
709 49 25 $self->{'init'} ? :
725 1 73 unless eval $code
13 3 @_ == 0 ? :
31 6 @_ == 0 ? :
23 7 @_ == 0 ? :
16 7 @_ == 0 ? :
25 27 @_ == 0 ? :
4 9 @_ == 0 ? :
2 2 @_ == 0 ? :
2 2 @_ == 0 ? :
7 7 @_ == 0 ? :
16 3 @_ == 0 ? :