Branch Coverage

blib/lib/Test2/Hub.pm
Criterion Covered Total %
branch 141 156 90.3


line true false branch
49 4 725 if $$UUID_VIA
51 728 1 unless defined $self->{'nested'}
52 607 122 unless defined $self->{'buffered'}
58 52 677 if (my $formatter = delete $self->{'formatter'})
62 15 714 if (my $ipc = $self->{'ipc'})
73 54 1 if $self->{'pid'} == $$ and $self->{'tid'} == 0
79 0 1 if (my $ipc = $self->{'ipc'})
104 291 1 unless $self->{'_formatter'} or exists $params{'formatter'}
106 24 1 if ($from->{'ipc'} and not $self->{'ipc'} and not exists $params{'ipc'})
112 53 239 if (my $ls = $from->{'_listeners'})
116 173 119 if (my $pfs = $from->{'_pre_filters'})
120 12 280 if (my $fs = $from->{'_filters'})
129 577 2908 if @_
145 0 343 if $$ != $self->{'pid'} or 0 != $self->{'tid'}
147 1 342 unless ref $sub and ref $sub eq 'CODE'
159 0 1 if $$ != $self->{'pid'} or 0 != $self->{'tid'}
171 0 11 if $$ != $self->{'pid'} or 0 != $self->{'tid'}
173 1 10 unless ref $sub and ref $sub eq 'CODE'
184 0 2 if $$ != $self->{'pid'} or 0 != $self->{'tid'}
193 1 481 unless ref $sub and ref $sub eq 'CODE'
212 0 4 if $$ != $self->{'pid'} or 0 != $self->{'tid'}
214 2 2 unless ref $sub and ref $sub eq 'CODE'
225 0 1 unless ref $sub and ref $sub eq 'CODE'
244 0 1 unless ref $sub and ref $sub eq 'CODE'
262 0 1 unless ref $sub and ref $sub eq 'CODE'
293 692 5327 $self->{'ipc'} ? :
297 43 5976 if $$UUID_VIA
299 3798 2221 if ($self->{'_pre_filters'})
302 3 5276 unless $e
308 1 691 if ($e->global)
314 10 681 if $$ != $self->{'pid'} or 0 != $self->{'tid'}
323 18 6056 if ($self->{'_filters'})
326 9 8 unless $e
332 3573 424 if ($type eq 'Test2::Event::Pass' or $type eq 'Test2::Event::Ok' and $e->{'pass'})
334 2855 718 if $self->{'_formatter'}
336 826 2747 if ($self->{'_listeners'})
346 540 1952 if $f->{'assert'} and not $f->{'assert'}{'pass'}
347 4 2488 if $f->{'errors'} and grep {$_->{'fail'};} @{$$f{'errors'};}
348 357 2135 if $f->{'amnesty'}
350 700 1792 if $f->{'assert'}
351 274 2 if $fail and $f->{'assert'}
352 276 2216 if $fail
354 783 1709 $f->{'control'} ? :
357 550 1942 if (my $plan = $f->{'plan'})
358 24 526 if ($plan->{'skip'}) { }
1 525 elsif ($plan->{'none'}) { }
371 0 783 if $f->{'control'} and $f->{'control'}{'has_callback'}
373 2174 318 if $self->{'_formatter'}
375 773 1719 if ($self->{'_listeners'})
379 11 2284 if ($f->{'control'} and $f->{'control'}{'halt'})
384 35 2457 if (defined $code)
385 23 12 if $self->{'_formatter'}
402 7 737 if $self->{'pid'} != $$ or $self->{'tid'} != 0
420 12 7 unless ($active or $do_plan or defined $plan or $count or $failed)
421 12 0 if $self->{'_formatter'}
425 454 3 unless ($self->{'ended'})
426 2 452 if ($self->{'_follow_ups'})
435 313 141 if ($plan and $plan eq 'NO PLAN' or $do_plan and not $plan)
447 3 454 if ($self->{'ended'})
461 328 126 if $self->{'_formatter'}
469 268 1930 if @_
472 425 1773 unless my $pass = $self->{'_passing'}
473 7 1766 if $self->{'failed'}
479 41 595 if not $count and $plan and $plan =~ /^SKIP$/
481 29 1696 if $ended and not $count && $plan
484 146 1550 unless $plan and $plan =~ /^\d+$/
486 872 678 if ($ended) { }
487 3 869 if $count != $plan
490 1 677 if $count > $plan
499 1385 582 unless @_
503 0 582 unless defined $plan
507 1 581 if $self->{'_plan'} and not $self->{'_plan'} =~ /^NO PLAN$/
509 1 580 unless $plan =~ /^(\d+|NO PLAN|SKIP)$/
518 0 124 unless $self->{'ended'}
521 0 115 unless $plan =~ /^\d+$/
523 114 1 if $plan == $self->{'count'}
530 1 50 unless $$ == $self->{'pid'}
531 0 50 unless 0 == $self->{'tid'}