Branch Coverage

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


line true false branch
47 5 168 if (my $formatter = delete $self->{'formatter'})
51 12 161 if (my $ipc = $self->{'ipc'})
74 59 1 unless $self->{'_formatter'} or exists $params{'formatter'}
76 25 1 if ($from->{'ipc'} and not $self->{'ipc'} and not exists $params{'ipc'})
82 9 51 if (my $ls = $from->{'_listeners'})
86 12 48 if (my $fs = $from->{'_filters'})
95 122 134 if @_
111 0 59 if $$ != $self->{'pid'} or 0 != $self->{'tid'}
113 1 58 unless ref $sub and ref $sub eq 'CODE'
125 0 1 if $$ != $self->{'pid'} or 0 != $self->{'tid'}
137 0 11 if $$ != $self->{'pid'} or 0 != $self->{'tid'}
139 1 10 unless ref $sub and ref $sub eq 'CODE'
150 0 2 if $$ != $self->{'pid'} or 0 != $self->{'tid'}
159 1 3 unless ref $sub and ref $sub eq 'CODE'
178 0 4 if $$ != $self->{'pid'} or 0 != $self->{'tid'}
180 2 2 unless ref $sub and ref $sub eq 'CODE'
191 0 1 unless ref $sub and ref $sub eq 'CODE'
210 0 1 unless ref $sub and ref $sub eq 'CODE'
228 0 1 unless ref $sub and ref $sub eq 'CODE'
246 6 1246 if ($self->{'_pre_filters'})
249 3 5 unless $e
255 1 645 if ($e->global)
261 11 634 if $$ != $self->{'pid'} or 0 != $self->{'tid'}
270 18 1242 if ($self->{'_filters'})
273 9 8 unless $e
280 96 167 $no_fail ? :
988 263 $is_ok ? :
282 1030 221 if $is_ok or not $no_fail and $e->increments_count
283 26 1225 if $causes_fail
285 167 1084 unless $is_ok or $no_fail
289 985 266 if $self->{'_formatter'}
291 277 974 if ($self->{'_listeners'})
295 1084 167 if $is_ok or $no_fail
298 6 161 if defined $code
313 6 64 if $self->{'pid'} != $$ or $self->{'tid'} != 0
330 14 7 unless $do_plan or defined $plan or $count or $failed
332 95 3 unless ($self->{'ended'})
333 2 93 if ($self->{'_follow_ups'})
342 84 11 if ($plan and $plan eq 'NO PLAN' or $do_plan and not $plan)
354 3 95 if ($self->{'ended'})
372 4 204 if @_
376 8 188 if $self->{'failed'}
382 2 12 if not $count and $plan and $plan =~ /^SKIP$/
384 10 176 if $ended and not $count && $plan
387 65 111 unless $plan and $plan =~ /^\d+$/
389 111 0 if ($ended) { }
390 0 111 if $count != $plan
393 0 0 if $count > $plan
402 9 110 unless @_
406 0 110 unless defined $plan
410 1 109 if $self->{'_plan'} and not $self->{'_plan'} =~ /^NO PLAN$/
412 1 108 unless $plan =~ /^(\d+|NO PLAN|SKIP)$/
421 0 40 unless $self->{'ended'}
424 0 32 unless $plan =~ /^\d+$/
426 32 0 if $plan == $self->{'count'}
433 1 50 unless $$ == $self->{'pid'}
434 0 50 unless 0 == $self->{'tid'}