Branch Coverage

blib/lib/Test2/Plugin/SourceDiag.pm
Criterion Covered Total %
branch 39 52 75.0


line true false branch
22 5 5 unless defined $params{'show_source'}
27 9 1 if $params{'show_source'} or $params{'inject_name'}
28 8 2 if $params{'show_source'} or $params{'show_args'}
29 3 7 if $params{'show_args'}
50 25 7 unless $event->causes_fail
52 0 7 unless my $trace = $event->trace
53 0 7 unless my $code = get_assert_code($trace)
56 3 4 if ($event->can('name') and not $event->name and $event->can('set_name'))
62 5 2 unless ($name_set)
76 24 6 unless $event->causes_fail
80 5 1 $meta ? :
81 6 0 $trace ? :
83 0 6 unless $code or $args
87 5 1 if $code
90 8 0 defined $_ ? :
3 3 if $args
106 0 7 unless my $file = $trace->file
107 0 7 unless my $line = $trace->line
108 0 7 unless my $sub = $trace->subname
111 0 7 if $short_sub eq '__ANON__'
119 1421 637 if not $_[1]->isa('PPI::Token::Whitespace')
0 7 unless my $it = $pd->find(sub { $_[1]->logical_line_number == $line if not $_[1]->isa('PPI::Token::Whitespace'); } )
121 0 7 unless my $found = $it->[0]
125 7 3 if ($thing->can('children') and $subs{($thing->children)[0]->content} or $subs{$thing->content})
139 7 0 if ($prefix and $prefix->isa('PPI::Token::Whitespace') and $prefix->content ne "\n")
142 7 0 if length $space