Branch Coverage

blib/lib/Test2/Plugin/SourceDiag.pm
Criterion Covered Total %
branch 37 50 74.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 30 7 unless $event->causes_fail
52 0 7 unless my $trace = $event->trace
53 0 7 unless my $code = get_assert_code($trace)
55 3 4 if ($event->can('name') and not $event->name and $event->can('set_name')) { }
74 31 6 unless $event->causes_fail
78 4 2 $meta ? :
79 6 0 $trace ? :
81 0 6 unless $code or $args
85 4 2 if $code
88 8 0 defined $_ ? :
3 3 if $args
104 0 7 unless my $file = $trace->file
105 0 7 unless my $line = $trace->line
106 0 7 unless my $sub = $trace->subname
109 0 7 if $short_sub eq '__ANON__'
117 1333 607 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'); } )
119 0 7 unless my $found = $it->[0]
123 7 3 if ($thing->can('children') and $subs{($thing->children)[0]->content} or $subs{$thing->content})
137 7 0 if ($prefix and $prefix->isa('PPI::Token::Whitespace') and $prefix->content ne "\n")
140 7 0 if length $space