Branch Coverage

blib/lib/Test2/API/Instance.pm
Criterion Covered Total %
branch 96 122 78.6


line true false branch
43 91 116 unless $self->{'finalized'}
55 21 57 unless @_
97 89 5 unless ($self->{'formatter'})
99 15 74 if ($ENV{'T2_FORMATTER'}) { }
1 73 elsif (@{$self->{'formatters'};}) { }
102 15 0 if ($ENV{'T2_FORMATTER'} =~ /^(\+)?(.*)$/) { }
103 10 5 $1 ? :
118 60 29 unless (ref $formatter or $formatter->can('write'))
121 5 55 unless ($ok)
133 36 53 unless $INC{'Test2/IPC.pm'} or @{$self->{'ipc_drivers'};}
138 50 3 unless (@{$self->{'ipc_drivers'};})
140 0 50 unless $ok
145 1 52 unless $driver->can('is_viable') and $driver->is_viable
146 0 52 unless $self->{'ipc'} = $driver->new
147 52 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 57 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 62 5 unless ($self->{'loaded'})
226 0 62 unless eval 'END { Test2::API::test2_set_is_end() }; 1'
239 5 13 unless $code and $rtype eq 'CODE'
250 3 2 unless $self->{'finalized'}
266 2 599 unless $self->{'ipc_polling'}
267 10 589 unless $self->{'ipc_shm_id'}
271 0 589 unless shmread $self->{'ipc_shm_id'}, $val, 0, $self->{'ipc_shm_size'}
273 581 8 if $val eq $self->{'ipc_shm_last'}
279 54 2 unless defined $self->ipc_polling
287 25 27 if defined $self->{'ipc_shm_id'}
293 27 0 $self->{'ipc'}->can('shm_size') ? :
294 4 23 unless my $shm_id = shmget($ipc_key, $shm_size, 438)
297 0 23 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 20 unless defined $self->{'ipc_shm_id'}
324 0 20 unless $val
332 1 2 unless defined $self->{'ipc_polling'}
342 23 14 if $pid == -1
343 8 6 unless $err
363 17 6 unless $fail
390 4 1 unless $ctx
392 0 1 if $ctx->_aborted and ${$ctx->_aborted;}
396 0 1 unless $trace->pid == $$
402 0 1 if $hub->bailed_out
403 0 1 if defined $hub->skip_reason
412 13 75 if ($self->{'pid'} != $$ or $self->{'tid'} != 0)
417 75 0 $self->{'stack'} ? :
419 16 50 if (@hubs and $self->{'ipc'} and not $self->{'no_wait'})
423 0 16 unless my $ipc = $hub->ipc
424 0 16 if $seen{$ipc}++
433 66 9 if (my $root = shift @hubs)
443 6 60 if (@hubs)
448 63 3 unless ($root->no_ending)
450 23 40 unless $root->ended
456 3 72 if $new_exit > 255
458 19 56 if ($new_exit)
462 3 16 if (@warn)