Branch Coverage

blib/lib/Test2/API/Context.pm
Criterion Covered Total %
branch 63 74 85.1


line true false branch
40 1 464 unless $self->{'trace'}
43 1 463 unless $self->{'hub'}
45 462 1 unless defined $self->{'_depth'}
47 463 0 unless exists $self->{'errno'}
48 463 0 unless exists $self->{'eval_error'}
49 463 0 unless exists $self->{'child_error'}
60 13973 37 unless $_[0]{'_is_canon'} or $_[0]{'_is_spawn'}
61 82 16 if $_[0]{'_aborted'} and ${$_[0]{'_aborted'};}
73 5 11 if ($self->{'eval_error'} eq $@ and $hub->is_local)
101 6 10 if $self->{'_is_spawn'}
107 0 10 if (my $cbk = $self->{'_on_release'})
110 2 8 if (my $hcbk = $hub->{'_context_release'})
123 27 13270 if $self->{'thrown'}
126 4987 8283 if $self->{'_is_spawn'}
129 1 8282 unless $self->{'_is_canon'}
135 0 8282 unless $CONTEXTS->{$hid} and $CONTEXTS->{$hid} == $self
141 2 8280 if (my $cbk = $self->{'_on_release'})
144 47 8235 if (my $hcbk = $hub->{'_context_release'})
178 1 6 if ($old) { }
186 1 6 unless $ok
187 0 6 unless $rok
199 23 0 if $self->{'_aborted'}
200 23 0 if $self->{'_is_canon'} or $self->{'_is_spawn'}
228 3 211 if ($self->{'_aborted'})
230 0 3 if $f->{'control'}{'halt'} or defined $f->{'control'}{'terminate'} or defined $e->terminate
268 1138 101 if ($self->{'_aborted'})
270 21 1109 if $f->{'control'}{'halt'} or defined $f->{'control'}{'terminate'} or defined $e->terminate
335 1 1 if (ref $msg eq 'Test2::EventFacet::Info::Table') { }
360 1 20 if (ref $msg eq 'Test2::EventFacet::Info::Table') { }
387 21 6 if $pass
391 1 5 if ($on_fail and @$on_fail)
407 18 0 $trace ? :
411 16 2 defined $name ? :
461 3 2 if ($event =~ /^\+(.*)/) { }
468 3 2 unless ($LOADED{$pkg})
471 1 2 unless $ok
477 0 4 unless $pkg->isa('Test2::Event')