Branch Coverage

blib/lib/Test2/Hub.pm
Criterion Covered Total %
branch 97 114 85.0


line true false branch
46 5 164 if (my $formatter = delete $self->{'formatter'})
50 12 157 if (my $ipc = $self->{'ipc'})
73 58 1 unless $self->{'_formatter'} or exists $params{'formatter'}
75 25 1 if ($from->{'ipc'} and not $self->{'ipc'} and not exists $params{'ipc'})
81 9 50 if (my $ls = $from->{'_listeners'})
85 12 47 if (my $fs = $from->{'_filters'})
94 118 130 if @_
110 0 58 if $$ != $self->{'pid'} or 0 != $self->{'tid'}
112 1 57 unless ref $sub and ref $sub eq 'CODE'
124 0 1 if $$ != $self->{'pid'} or 0 != $self->{'tid'}
136 0 11 if $$ != $self->{'pid'} or 0 != $self->{'tid'}
138 1 10 unless ref $sub and ref $sub eq 'CODE'
149 0 2 if $$ != $self->{'pid'} or 0 != $self->{'tid'}
158 1 3 unless ref $sub and ref $sub eq 'CODE'
177 0 4 if $$ != $self->{'pid'} or 0 != $self->{'tid'}
179 2 2 unless ref $sub and ref $sub eq 'CODE'
190 0 1 unless ref $sub and ref $sub eq 'CODE'
209 0 1 unless ref $sub and ref $sub eq 'CODE'
227 0 1 unless ref $sub and ref $sub eq 'CODE'
245 6 1218 if ($self->{'_pre_filters'})
248 3 5 unless $e
254 1 625 if ($e->global)
260 11 614 if $$ != $self->{'pid'} or 0 != $self->{'tid'}
269 18 1214 if ($self->{'_filters'})
272 9 8 unless $e
279 96 162 $no_fail ? :
965 258 $is_ok ? :
281 1006 217 if $is_ok or not $no_fail and $e->increments_count
282 26 1197 if $causes_fail
284 162 1061 unless $is_ok or $no_fail
288 960 263 if $self->{'_formatter'}
290 274 949 if ($self->{'_listeners'})
294 1061 162 if $is_ok or $no_fail
297 6 156 if defined $code
312 6 63 if $self->{'pid'} != $$ or $self->{'tid'} != 0
329 14 7 unless $do_plan or defined $plan or $count or $failed
331 91 3 unless ($self->{'ended'})
332 2 89 if ($self->{'_follow_ups'})
341 80 11 if ($plan and $plan eq 'NO PLAN' or $do_plan and not $plan)
353 3 91 if ($self->{'ended'})
371 4 199 if @_
375 8 183 if $self->{'failed'}
381 2 12 if not $count and $plan and $plan =~ /^SKIP$/
383 10 171 if $ended and not $count && $plan
386 65 106 unless $plan and $plan =~ /^\d+$/
388 106 0 if ($ended) { }
389 0 106 if $count != $plan
392 0 0 if $count > $plan
401 9 106 unless @_
405 0 106 unless defined $plan
409 1 105 if $self->{'_plan'} and not $self->{'_plan'} =~ /^NO PLAN$/
411 1 104 unless $plan =~ /^(\d+|NO PLAN|SKIP)$/
420 0 39 unless $self->{'ended'}
423 0 31 unless $plan =~ /^\d+$/
425 31 0 if $plan == $self->{'count'}
432 1 50 unless $$ == $self->{'pid'}
433 0 50 unless 0 == $self->{'tid'}