blib/lib/Test2/Event/Skip.pm

filter: Statementstmt 96.4% 27 / 28 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 87.5% 7 / 8 Podpod 50.0% 2 / 4 totaltotal 90.9% 40 / 44 CC 3 SCAR 4.1
CC
3
Cov
97%
causes_fail
2.0
summary
2.0
extra_amnesty
2.0
CRAP 1.5
« lib/Test/Builder/Tester/Color.pm ↑ Summary blib/lib/Test2/Compare/Negatable.pm »
1 package Test2::Event::Skip;
2 455 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 455 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 455 our $VERSION = '1.302226';
6  
7  
8 455 ▶BEGIN { require Test2::Event::Ok; our @ISA = qw(Test2::Event::Ok) }
Subroutine BEGIN: called CC=1 SCAR=0.0
9 455 ▶use Test2::Util::HashBase qw{reason};
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 151 ▶sub init {
Subroutine init: called CC=1 SCAR=0.0
Pod undocumented
12 151 my $self = shift;
13 151 $self->SUPER::init;
14 151 $self->{+EFFECTIVE_PASS} = 1;
15 }
16  
17 0 ▶sub causes_fail { 0 }
Subroutine causes_fail: not called CC=1 SCAR=6.9
Pod documented
18  
19 2 ▶sub summary {
Subroutine summary: called CC=2 SCAR=6.9
Pod documented
20 2 my $self = shift;
21 2 my $out = $self->SUPER::summary(@_);
22  
23 2 ▶ if (my $reason = $self->reason) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $reason = $self->reason) { } 1 1 2
24 1 $out .= " (SKIP: $reason)";
25 }
26 else {
27 1 $out .= " (SKIP)";
28 }
29  
30 2 return $out;
31 }
32  
33 509 ▶sub extra_amnesty {
Subroutine extra_amnesty: called CC=2 SCAR=6.9
Pod undocumented
34 509 my $self = shift;
35  
36 509 my @out;
37  
38 push @out => {
39 tag => 'TODO',
40 details => $self->{+TODO},
41 509 ▶ } if defined $self->{+TODO};
Branch: 1 branch
BranchTrueFalseTotal
if defined $self->{"todo"} 6 503 509
42  
43 push @out => {
44 tag => 'skip',
45 509 details => $self->{+REASON},
46 inherited => 0,
47 };
48  
49 509 return @out;
50 }
51  
52 455 1;
53  
54 __END__
« lib/Test/Builder/Tester/Color.pm ↑ Summary blib/lib/Test2/Compare/Negatable.pm »