Branch Coverage

blib/lib/Test2/API/Instance.pm
Criterion Covered Total %
branch 92 118 77.9


line true false branch
43 88 113 unless $self->{'finalized'}
55 20 54 unless @_
97 86 5 unless ($self->{'formatter'})
99 15 71 if ($ENV{'T2_FORMATTER'}) { }
1 70 elsif (@{$self->{'formatters'};}) { }
102 15 0 if ($ENV{'T2_FORMATTER'} =~ /^(\+)?(.*)$/) { }
103 10 5 $1 ? :
118 57 29 unless (ref $formatter or $formatter->can('write'))
121 5 52 unless ($ok)
133 34 52 unless $INC{'Test2/IPC.pm'} or @{$self->{'ipc_drivers'};}
138 49 3 unless (@{$self->{'ipc_drivers'};})
140 0 49 unless $ok
145 1 51 unless $driver->can('is_viable') and $driver->is_viable
146 0 51 unless $self->{'ipc'} = $driver->new
147 51 0 if $self->{'ipc'}->use_shm
154 6 5 $_[0]{'formatter'} ? :
161 1 0 unless $self->{'finalized'}
176 0 3 unless $code and $rtype eq 'CODE'
188 0 56 unless $code and $rtype eq 'CODE'
200 0 4 unless $code and $rtype eq 'CODE'
212 5 13 unless $code and $rtype eq 'CODE'
216 8 5 if $self->{'loaded'}
221 59 5 unless ($self->{'loaded'})
226 0 59 unless eval 'END { Test2::API->_set_is_end() }; 1'
239 5 13 unless $code and $rtype eq 'CODE'
250 3 2 unless $self->{'finalized'}
266 2 582 unless $self->{'ipc_polling'}
267 10 572 unless $self->{'ipc_shm_id'}
271 0 572 unless shmread $self->{'ipc_shm_id'}, $val, 0, $self->{'ipc_shm_size'}
273 564 8 if $val eq $self->{'ipc_shm_last'}
279 53 2 unless defined $self->ipc_polling
287 25 26 if defined $self->{'ipc_shm_id'}
293 26 0 $self->{'ipc'}->can('shm_size') ? :
294 4 22 unless my $shm_id = shmget($ipc_key, $shm_size, 438)
297 0 22 unless shmwrite $shm_id, $initial, 0, $shm_size
309 0 0 unless defined $self->{'ipc_shm_id'}
311 0 0 unless shmread $self->{'ipc_shm_id'}, $val, 0, $self->{'ipc_shm_size'}
312 0 0 if $val eq $self->{'ipc_shm_last'}
320 13 19 unless defined $self->{'ipc_shm_id'}
324 0 19 unless $val
332 1 2 unless defined $self->{'ipc_polling'}
342 22 14 if $pid == -1
343 8 6 unless $err
363 16 6 unless $fail
374 4 1 unless $ctx
376 0 1 if $ctx->_aborted and ${$ctx->_aborted;}
380 0 1 unless $trace->pid == $$
386 0 1 if $hub->bailed_out
387 0 1 if defined $hub->skip_reason
396 13 69 if ($self->{'pid'} != $$ or $self->{'tid'} != 0)
401 69 0 $self->{'stack'} ? :
403 15 48 if (@hubs and $self->{'ipc'} and not $self->{'no_wait'})
407 0 15 unless my $ipc = $hub->ipc
408 0 15 if $seen{$ipc}++
417 63 6 if (my $root = shift @hubs)
427 6 57 if (@hubs)
432 60 3 unless ($root->no_ending)
434 23 37 unless $root->ended
440 3 66 if $new_exit > 255