ZProperty.pm

filter: Statementstmt 67.5% 73 / 108 Branchbran 37.5% 15 / 40 Conditioncond 50.0% 3 / 6 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 76.9% 10 / 13 Podpod 0.0% 0 / 9 totaltotal 56.1% 101 / 180 CC 22 SCAR 26.4
CC
22
Cov
59%
next
28.7
set_value
9.4
get_value
7.3
CRAP 14.0
« ZIO_dumb.pm ↑ Summary ZText.pm »
1 package Games::Rezrov::ZProperty;
2 # object properties
3  
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use constant FIRST_PROPERTY => -1;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 # used to find the first property in the object
8  
9 1 ▶use Games::Rezrov::Inliner;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use Games::Rezrov::InlinedPrivateMethod;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 1 my $code = new Games::Rezrov::InlinedPrivateMethod("-manual" => 1,
13 "-names" =>
14 [ qw (
15 _property_exists
16 _property_number
17 _property_len
18 _property_offset
19 _size_byte
20 _pointer
21 _pre_v4
22 _zobj
23 _search_id
24 )
25 ],
26 );
27 1 Games::Rezrov::Inliner::inline($code);
28  
29 #print $$code; die;
30  
31 0 ▶eval $$code; die $@ if $@;
Subroutine get_data_address: called CC=1 SCAR=0.9
Subroutine get_default_value: called CC=1 SCAR=0.9
Subroutine get_next: not called CC=1 SCAR=0.9
Subroutine get_value: called CC=5 SCAR=19.9
Subroutine new: called CC=1 SCAR=0.9
Subroutine next: called CC=13 SCAR=33.6
Subroutine property_exists: called CC=1 SCAR=0.9
Subroutine property_number: not called CC=1 SCAR=0.9
Subroutine set_value: not called CC=6 SCAR=22.4
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Branch: 20 branches
BranchTrueFalseTotal
if ($_[0][0]) { } 14 11 25
if ($len == 2) { } 14 0 14
elsif ($len == 1) { } 0 0 0
if (Games::Rezrov::ZOptions::SNOOP_PROPERTIES()) 0 14 14
if $self->[5] == 0 0 19 19
if ($size_byte == 0) { } 6 60 66
if ($pre_v4) { } 60 0 60
if (($size_byte & 128) > 0) { } 0 0 0
if ($property_len == 0) 0 0 0
($size_byte & 64) > 0 ? : 0 0 0
if (not defined $search_id or $search_id == -1) { } 0 60 60
if ($last_id and $property_number > $last_id) { } 0 60 60
elsif ($search_id > $property_number) { } 2 58 60
if ($property_number == $search_id) 11 47 58
if ($self->[0]) { } 0 0 0
if (Games::Rezrov::ZOptions::SNOOP_PROPERTIES()) 0 0 0
if ($len == 1) { } 0 0 0
elsif ($len == 2) { } 0 0 0
unless $Games::Rezrov::IGNORE_PROPERTY_ERRORS 0 0 0
if $@ 0 1 1
Condition50%3/6
not defined $search_id or $search_id == -1
l!l&&r!l&&!r
0060
$last_id and $property_number > $last_id
!ll&&!rl&&r
19410
MC/DC0%0/2
not defined $search_id or $search_id == -1
not defined $search_id $search_id == -1
MC/DC0%0/2
$last_id and $property_number > $last_id
$last_id $property_number > $last_id
Truth table33%1/3
not(A) or B
A= not defined $search_idB= $search_id == -1
ABresult
1X1
011
000
Truth table66%2/3
A and B
A= $last_idB= $property_number > $last_id
ABresult
0X0
100
111
32  
33 1 1;
34  
35 __DATA__
« ZIO_dumb.pm ↑ Summary ZText.pm »