test-lib/Car/Fiat.pm

filter: Statementstmt 66.6% 8 / 12 Branchbran n/a Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 33.3% 2 / 6 Podpod 0.0% 0 / 5 totaltotal 39.2% 11 / 28 CC 2 SCAR 6.4
CC
2
Cov
60%
new
2.1
openDoors
2.0
closeDoors
2.0
CRAP 1.9
« test-lib/Car/Ford.pm ↑ Summary test-lib/Car/AbstractFactory.pm »
1 package Car::Fiat;
2  
3 3 ▶use Class::Interface;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 implements 'Car::Interface';
5  
6 1 ▶sub new {
Subroutine new: called CC=2 SCAR=7.6
Pod undocumented
7 1 ▶ my $class = ref($_[0]) || $_[0]; shift;
Condition33%1/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
010
MC/DC0%0/2
ref $_[0] || $_[0]
ref $_[0] $_[0]
Truth table33%1/3
A || B
A= ref $_[0]B= $_[0]
ABresult
1X1
011
000
8 1 return bless( {}, $class );
9 }
10  
11  
12 0 ▶sub openDoors {
Subroutine openDoors: not called CC=1 SCAR=6.9
Pod undocumented
13 0 print "Doors open in fiat style"
14 }
15 0 ▶sub closeDoors {
Subroutine closeDoors: not called CC=1 SCAR=6.9
Pod undocumented
16 0 print "Doors close in fiat style"
17 }
18 0 ▶sub start {
Subroutine start: not called CC=1 SCAR=6.9
Pod undocumented
19 0 print "Hey! Nothings happens"
20 }
21 0 ▶sub stop {
Subroutine stop: not called CC=1 SCAR=6.9
Pod undocumented
22 0 print "Still nothing happens - I was never started."
23 }
24  
25 3 1;
« test-lib/Car/Ford.pm ↑ Summary test-lib/Car/AbstractFactory.pm »