ClassFile/Util/FrameTypeStringification.pm

filter: Statementstmt 59.0% 13 / 22 Branchbran 0.0% 0 / 14 Conditioncond 0.0% 0 / 12 MC/DCmcdc 0.0% 0 / 8 Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 1 totaltotal 26.2% 16 / 61 SCAR 42.2
CC
12
Cov
27%
frameTypeStringificator
156.0
BEGIN
1.0
BEGIN
1.0
CRAP 67.8
« ClassFile/BNF/ElementValue.pm ↑ Summary ClassFile/BNF/StackMapFrameArray.pm »
1 8 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 8 ▶use warnings FATAL => 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package MarpaX::Java::ClassFile::Util::FrameTypeStringification;
5 8 ▶use Exporter 'import'; # gives you Exporter's import() method directly
Subroutine BEGIN: called CC=1 SCAR=0.0
6 8 our @EXPORT_OK = qw/frameTypeStringificator/;
7  
8 # ABSTRACT: Returns the string describing a frame type
9  
10 8 our $VERSION = '0.008'; # VERSION
11  
12 8 our $AUTHORITY = 'cpan:JDDPAUSE'; # AUTHORITY
13  
14 sub frameTypeStringificator {
15 # my ($self, $frame_type) = @_;
16  
17 0 ▶ if (($_[1] >= 0) && ($_[1] <= 63)) { 'SAME' }
Subroutine frameTypeStringificator: not called CC=12 SCAR=50.5
Pod undocumented
Branch: 7 branches
BranchTrueFalseTotal
if ($_[1] >= 0 and $_[1] <= 63) { } 0 0 0
elsif ($_[1] >= 64 and $_[1] <= 127) { } 0 0 0
elsif ($_[1] == 247) { } 0 0 0
elsif ($_[1] >= 248 and $_[1] <= 250) { } 0 0 0
elsif ($_[1] == 251) { } 0 0 0
elsif ($_[1] >= 252 and $_[1] <= 254) { } 0 0 0
elsif ($_[1] == 255) { } 0 0 0
Condition0%0/3
$_[1] >= 0 and $_[1] <= 63
!ll&&!rl&&r
000
MC/DC0%0/2
$_[1] >= 0 and $_[1] <= 63
$_[1] >= 0 $_[1] <= 63
Truth table0%0/3
A and B
A= $_[1] >= 0B= $_[1] <= 63
ABresult
0X0
100
111
18 0 ▶ elsif (($_[1] >= 64) && ($_[1] <= 127)) { 'SAME_LOCALS_1_STACK_ITEM' }
Condition0%0/3
$_[1] >= 64 and $_[1] <= 127
!ll&&!rl&&r
000
MC/DC0%0/2
$_[1] >= 64 and $_[1] <= 127
$_[1] >= 64 $_[1] <= 127
Truth table0%0/3
A and B
A= $_[1] >= 64B= $_[1] <= 127
ABresult
0X0
100
111
19 0 elsif ( $_[1] == 247) { 'SAME_LOCALS_1_STACK_ITEM_EXTENDED' }
20 0 ▶ elsif (($_[1] >= 248) && ($_[1] <= 250)) { 'CHOP' }
Condition0%0/3
$_[1] >= 248 and $_[1] <= 250
!ll&&!rl&&r
000
MC/DC0%0/2
$_[1] >= 248 and $_[1] <= 250
$_[1] >= 248 $_[1] <= 250
Truth table0%0/3
A and B
A= $_[1] >= 248B= $_[1] <= 250
ABresult
0X0
100
111
21 0 elsif ( $_[1] == 251) { 'SAME_FRAME_EXTENDED' }
22 0 ▶ elsif (($_[1] >= 252) && ($_[1] <= 254)) { 'APPEND' }
Condition0%0/3
$_[1] >= 252 and $_[1] <= 254
!ll&&!rl&&r
000
MC/DC0%0/2
$_[1] >= 252 and $_[1] <= 254
$_[1] >= 252 $_[1] <= 254
Truth table0%0/3
A and B
A= $_[1] >= 252B= $_[1] <= 254
ABresult
0X0
100
111
23 0 elsif ( $_[1] == 255) { 'FULL_FRAME' }
24 0 else { 'UNMANAGED_FRAME_TYPE' }
25 }
26  
27 8 1;
28  
29 __END__
30  
31 =pod
32  
33 =encoding UTF-8
34  
35 =head1 NAME
36  
37 MarpaX::Java::ClassFile::Util::FrameTypeStringification - Returns the string describing a frame type
38  
39 =head1 VERSION
40  
41 version 0.008
42  
43 =head1 AUTHOR
44  
45 Jean-Damien Durand <jeandamiendurand@free.fr>
46  
47 =head1 COPYRIGHT AND LICENSE
48  
49 This software is copyright (c) 2016 by Jean-Damien Durand.
50  
51 This is free software; you can redistribute it and/or modify it under
52 the same terms as the Perl 5 programming language system itself.
53  
54 =cut
« ClassFile/BNF/ElementValue.pm ↑ Summary ClassFile/BNF/StackMapFrameArray.pm »