Branch Coverage

blib/lib/STUN/RFC_5389.pm
Criterion Covered Total %
branch 26 42 61.9


line true false branch
349 0 2 if ($a_len % 2 != 0)
376 1 2 $message ne 'STUN::RFC_5389' ? :
379 2 1 if (ref $message)
381 1 1 if ($$message{'request'}) { }
1 0 elsif ($$message{'indication'}) { }
411 0 1 unless true_stun_message(@received{'message_type', 'message_length', 'magic_cookie', 'transaction_id', 'attributes'}, 0)
437 0 2 if $length + $fixed_length > length $attributes
440 1 1 if $fixed_length
442 2 0 if (length $attr_value == $length and my $type_name = $STUN::RFC_5389::attribute_registry{$type})
469 1 1 $message ne 'STUN::RFC_5389' ? :
474 0 2 unless true_stun_message($message_type, $message_length, $magic_cookie, $transaction_id, $attributes, 1)
477 1 1 if $message_type eq '0011'
486 1 0 if ($magic_cookie eq '2112a442') { }
516 0 3 unless ($message_type =~ /^[0-3]/)
520 0 3 if ($message_length % 4 != 0)
524 0 3 if ($message_length and not $attributes or not $message_length and $attributes or $message_length != length($attributes) / 2)
527 0 0 $attributes ? :
530 0 3 if ($magic_cookie ne '2112a442')
534 0 1 if ($message_type ne '0001' and $message_type ne '0011' and $message_type ne '0101' and $message_type ne '0111')
541 0 3 if ($i_am_server and $message_type ne '0001' and $message_type ne '0011') { }
0 4 elsif (not $i_am_server and $message_type ne '0101' and $message_type ne '0111') { }