Branch Coverage

lib/Types/Standard/Dict.pm
Criterion Covered Total %
branch 114 134 85.0


line true false branch
35 1 116 if @_ % 2
38 111 189 unless @array
44 18 38 @_ && Types::TypeTiny::is_TypeTiny($_[-1]) && $_[-1]->is_strictly_a_type_of($_Slurpy) ? :
57 1 87 unless Types::TypeTiny::is_TypeTiny($v)
61 1 86 unless Types::TypeTiny::is_StringLike($k)
69 83 38 if ($slurpy) { }
70 127 54 exists $constraints{$_} ? :
72 22 61 unless $slurpy->check(\%tmp)
78 10 17 $is_optional{$k} ? :
27 118 unless exists $value->{$k}
79 38 80 unless $constraints{$k}->check($value->{$k})
90 18 35 @_ && Types::TypeTiny::is_TypeTiny($_[-1]) && $_[-1]->is_strictly_a_type_of($_Slurpy) ? :
96 0 53 if $slurpy and not $slurpy->can_be_inlined
117 3 81 unless $c->can_be_inlined
148 19 247 $slurpy ? :
168 266 $slurpy_is_map ? :
45 434 $slurpy_is_any ? :
156 206 579 $constraints{$_}->is_strictly_a_type_of($_optional) ? :
169 0 8 @params && Types::TypeTiny::is_TypeTiny($params[-1]) && $params[-1]->is_strictly_a_type_of($_Slurpy) ? :
188 2 13 if $constraints{$k}->has_parent and $constraints{$k}->parent == &Types::Standard::Optional() and not exists $value->{$k}
189 9 5 if $constraints{$k}->check($value->{$k})
194 3 2 unless exists $value->{$k}
212 0 3 if ($slurpy) { }
213 0 0 exists $constraints{$_} ? :
218 0 0 if $explain
232 3 3 unless exists $constraints{$k}
244 6 23 @_ && Types::TypeTiny::is_TypeTiny($_[-1]) && $_[-1]->is_strictly_a_type_of($_Slurpy) ? :
256 1 49 unless $tc->can_be_inlined
257 6 44 if $tc->has_coercion and not $tc->coercion->can_be_inlined
258 27 23 if $tc->has_coercion
260 0 29 if $slurpy and not $slurpy->can_be_inlined
261 1 5 if $slurpy and $slurpy->has_coercion and not $slurpy->coercion->can_be_inlined
266 4 25 if $slurpy and $slurpy->has_coercion
267 11 18 unless $child_coercions_exist
269 12 6 if ($all_inlinable) { }
275 0 5 unless length $b <=> length $a
282 4 7 if ($slurpy) { }
288 3 1 if ($slurpy->has_coercion) { }
322 18 2 $ct_coerce ? :
350 7 0 @_ ? :
353 3 4 if ($slurpy) { }
354 3 4 exists $dict{$_} ? :
357 1 2 if ($slurpy->check(\%slurped)) { }
1 1 elsif ($slurpy->has_coercion) { }
362 1 0 $slurpy->check($coerced) ? :
370 0 8 unless exists $dict{$k}
375 2 10 if $is_optional{$k} and not exists $value->{$k}
378 7 3 $ct->has_coercion ? :
380 0 10 unless $ct->check($x)
396 0 89 if $self == &Types::Standard::Dict()
399 91 0 if $_->has_parent
401 61 28 @{$dict->parameters;} && Types::TypeTiny::is_TypeTiny($dict->parameters->[-1]) && $dict->parameters->[-1]->is_strictly_a_type_of($_Slurpy) ? :
412 6 69 if $self == &Types::Standard::Dict()
415 92 0 if $_->has_parent
418 47 22 if ($slurpy) { }
429 23 46 if exists $params{$key}
430 14 32 unless $slurpy
432 6 20 if $slurpy == &Types::Standard::Any() or $slurpy == &Types::Standard::Item() or $slurpy == &Types::Standard::Defined() or $slurpy == &Types::Standard::Ref()
437 18 2 if $slurpy->is_a_type_of(&Types::Standard::HashRef())
446 2 16 unless $self->my_hashref_allows_key($key)
447 0 16 if $self == &Types::Standard::Dict()
450 18 0 if $_->has_parent
453 12 4 if ($slurpy) { }
464 6 10 if exists $params{$key} and $params{$key}->check($value)
465 2 8 unless $slurpy
467 0 8 if $slurpy == &Types::Standard::Any() or $slurpy == &Types::Standard::Item() or $slurpy == &Types::Standard::Defined() or $slurpy == &Types::Standard::Ref()
472 8 0 if $slurpy->is_a_type_of(&Types::Standard::HashRef())