Branch Coverage

blib/lib/Test2/API/InterceptResult/Event.pm
Criterion Covered Total %
branch 174 212 82.0


line true false branch
27 35 0 if (eval {
43 0 420 unless $key and defined $list
57 810 3 if exists $FACETS{$facet}
74 0 0 if $facet ne $key
79 0 0 if $ok and $FACETS{$facet}
90 2 116 unless $INC{$rc_file}
97 6 349 unless defined $is_list
101 128 221 if ($is_list) { }
102 1 127 unless $type eq 'ARRAY'
107 175 1 if $itype eq 'HASH'
113 1 220 unless $type eq 'HASH'
136 0 217 unless ($spec->{'loaded'})
138 0 0 unless $INC{$file}
149 24 131 unless defined $self->{'facet_data'}{$name}
153 0 131 unless my $type = &reftype($data)
155 127 4 if $type eq 'HASH'
158 4 0 if ($type eq 'ARRAY')
159 0 4 unless @$data
160 1 3 if @$data != 1
171 44 87 unless exists $self->{'facet_data'}{$name}
175 0 87 unless my $type = &reftype($data)
178 10 77 if $type eq 'HASH'
179 77 10 if $type eq 'ARRAY'
190 18 37 if exists $self->{'causes_failure'}
195 34 3 $hub->is_passing ? :
202 18 64 unless my $t = $_[0]->the_trace
0 64 unless $t->{'frame'}
203 5 19 unless my $t = $_[0]->the_trace
12 7 unless $t->{'details'}
204 1 2 unless my $f = $_[0]->frame
1 1 unless $f->[0]
205 5 19 unless my $f = $_[0]->frame
1 18 unless $f->[1]
206 5 20 unless my $f = $_[0]->frame
1 19 unless $f->[2]
207 5 19 unless my $f = $_[0]->frame
1 18 unless $f->[3]
208 1 2 unless my $f = $_[0]->frame
1 1 unless $f->[3]
210 0 36 unless my $t = $_[0]->the_trace
0 36 unless Test2::EventFacet::Trace::signature($t)
223 52 27 unless my $got = $self->$meth
243 11 2 unless defined $out->{'trace_details'}
245 78 151 if $finfo->{'list'}
246 52 13 unless my $set = delete $todo->{$tagged}
253 1 12 if $tagged eq 'amnesty' and not $has_assert || $has_parent || $has_fatal_error
256 5 29 $item->{'fail'} ? :
260 7 6 if (my $assert = delete $todo->{'assert'})
265 2 11 if (my $parent = delete $todo->{'parent'})
266 2 0 unless defined $out->{'subtest'}{'bailed_out'}
267 2 0 unless defined $out->{'subtest'}{'skip_reason'}
269 2 0 if (my $res = $self->subtest_result)
274 1 1 if $params{'include_subevents'}
278 3 10 if (my $control = delete $todo->{'control'})
279 1 2 if ($control->{'halt'}) { }
2 0 elsif (defined $control->{'details'}) { }
287 1 12 if (my $plan = delete $todo->{'plan'})
293 0 8 unless my $data = $todo->{$other}
295 2 6 if (&reftype($data) eq 'ARRAY') { }
296 2 0 if (not $out->{$other} or &reftype($out->{$other}) eq 'ARRAY')
298 2 0 if defined $item->{'details'}
303 6 0 if defined $data->{'details'} and not defined $out->{$other}
307 1 12 if (my $fields = $params{'fields'})
308 2 0 exists $out->{$_} ? :
311 1 12 if (my $remove = $params{'remove'})
335 1 20 if (my $fields = $params{'fields'})
336 2 0 exists $out->{$_} ? :
339 1 20 if (my $remove = $params{'remove'})
346 21 66 $_[0]{'facet_data'}{'assert'} ? :
354 6 18 unless my $as = $fd->{'assert'}
357 16 2 $as->{'pass'} ? :
358 2 16 if $am
362 8 40 $_[0]{'facet_data'}{'parent'} ? :
369 2 7 unless my $parent = $self->{'facet_data'}{'parent'}
373 3 4 unless &blessed($children) and $children->isa($self->{'result_class'})
378 1 28 $_[0]->bailout ? :
383 54 12 unless my $control = $self->{'facet_data'}{'control'}
384 10 2 if $control->{'halt'}
390 26 7 unless my $bo = $self->bailout
392 0 7 unless my $reason = $bo->{'details'}
398 1 1 unless my $bo = $self->bailout
402 2 33 $_[0]{'facet_data'}{'plan'} ? :
409 4 9 unless my $plan = $self->{'facet_data'}{'plan'}
413 5 4 unless my $reason = $plan->{'details'}
421 1 8 if $plan->{'none'}
422 2 6 if $plan->{'skip'} or not $plan->{'count'}
426 1 1 $_[0]{'facet_data'}{'amnesty'} ? :
431 1 1 &first(sub {
433 0 2 unless $_->{'details'}
435 1 1 &first(sub {
437 0 2 unless $_->{'details'}
440 1 1 &first(sub {
442 0 0 unless $_->{'details'} or $_->{'tag'}
444 16 34 $_[0]{'facet_data'}{'errors'} ? :
447 0 0 unless $_->{'details'} or $_->{'tag'}
452 20 10 unless my $errors = $self->{'facet_data'}{'errors'}
454 3 7 @$errors > 1 ? :
456 0 10 unless @$errors
462 4 6 if @extra or @$errors > 1
467 29 5 $_[0]{'facet_data'}{'info'} ? :
472 2 6 &first(sub {
474 0 6 unless $_->{'details'}
476 2 6 &first(sub {
478 0 6 unless $_->{'details'}
481 1 1 &first(sub {
483 0 0 unless $_->{'details'} or $_->{'tag'}