SDK/Storage/Tables/TransactionResultItem.pm

filter: Statementstmt 100% 20 / 20 Branchbran 66.6% 4 / 6 Conditioncond 41.6% 5 / 12 MC/DCmcdc 0.0% 0 / 6 Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 69.3% 34 / 49 CC 8 SCAR 21.5
CC
8
Cov
76%
__ANON__
12.4
BEGIN
1.0
BEGIN
1.0
CRAP 8.6
« SDK/Storage/Tables/SharedKey.pm ↑ Summary SDK/Storage/Tables/Transaction.pm »
1 6 ▶use v5.36;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 6 ▶use feature 'class';
Subroutine BEGIN: called CC=1 SCAR=0.0
3 6 ▶no warnings 'experimental::class';
Subroutine BEGIN: called CC=1 SCAR=0.0
4
5 6 class Azure::SDK::Storage::Tables::TransactionResultItem {
6 6 ▶ use Carp qw(croak);
Subroutine BEGIN: called CC=1 SCAR=0.0
7
8 6 field $status :param :reader;
9 6 field $content_id :param :reader = undef;
10 6 field $etag :param :reader = undef;
11
12 5 ▶ ADJUST {
Subroutine __ANON__: called CC=8 SCAR=25.2
13 5 ▶ croak 'Table transaction result status must be numeric'
Branch: 1 branch
BranchTrueFalseTotal
unless defined $status and not ref $status and $status =~ /\A[0-9]+\z/u 0 5 5
Condition33%2/6
defined $status and not ref $status and $status =~ /\A[0-9]+\z/u
!ll&&!rl&&r
005
defined $status and not ref $status
!ll&&!rl&&r
005
MC/DC0%0/3
defined $status and not ref $status and $status =~ /\A[0-9]+\z/u
defined $status not ref $status $status =~ /\A[0-9]+\z/u
Truth table25%1/4
A and not(B) and C
A= defined $statusB= not ref $statusC= $status =~ /\A[0-9]+\z/u
ABCresult
0XX0
10X0
1100
1111
14 unless defined $status && !ref($status) && $status =~ /\A[0-9]+\z/;
15 5 $status = 0 + $status;
16 5 ▶ croak 'Table transaction result content_id must be numeric'
Branch: 1 branch
BranchTrueFalseTotal
if defined $content_id and ref $content_id || !($content_id =~ /\A[0-9]+\z/u) 0 5 5
Condition50%3/6
defined $content_id and ref $content_id || !($content_id =~ /\A[0-9]+\z/u)
!ll&&!rl&&r
230
ref $content_id or not $content_id =~ /\A[0-9]+\z/u
l!l&&r!l&&!r
003
MC/DC0%0/3
defined $content_id and ref $content_id || !($content_id =~ /\A[0-9]+\z/u)
defined $content_id ref $content_id not $content_id =~ /\A[0-9]+\z/u
Truth table50%2/4
A and B or not(C)
A= defined $content_idB= ref $content_idC= not $content_id =~ /\A[0-9]+\z/u
ABCresult
0XX0
1000
11X1
1011
17 if defined $content_id
18 && (ref($content_id) || $content_id !~ /\A[0-9]+\z/);
19 5 ▶ $content_id = 0 + $content_id if defined $content_id;
Branch: 1 branch
BranchTrueFalseTotal
if defined $content_id 3 2 5
20 }
21 }
22
23 6 1;
24
25 __END__
« SDK/Storage/Tables/SharedKey.pm ↑ Summary SDK/Storage/Tables/Transaction.pm »