Lines Matching defs:plan

357     if (my $plan = $f->{plan}) {
358 if ($plan->{skip}) {
359 $self->plan('SKIP');
360 $self->set_skip_reason($plan->{details} || 1);
363 elsif ($plan->{none}) {
364 $self->plan('NO PLAN');
367 $self->plan($plan->{count});
414 my $plan = $self->{+_PLAN};
420 unless ($active || $do_plan || defined($plan) || $count || $failed) {
421 $self->{+_FORMATTER}->finalize($plan, $count, $failed, 0, $self->is_subtest) if $self->{+_FORMATTER};
431 $plan = $self->{+_PLAN};
435 if ((defined($plan) && $plan eq 'NO PLAN') || ($do_plan && !defined($plan))) {
443 $plan = $self->{+_PLAN};
461 $self->{+_FORMATTER}->finalize($plan, $count, $failed, $pass, $self->is_subtest) if $self->{+_FORMATTER};
477 my $plan = $self->{+_PLAN};
479 return $pass if !$count && $plan && $plan =~ m/^SKIP$/;
482 if $ended && (!$count || !$plan);
484 return $pass unless $plan && $plan =~ m/^\d+$/;
487 return $self->{+_PASSING} = 0 if $count != $plan;
490 return $self->{+_PASSING} = 0 if $count > $plan;
496 sub plan {
501 my ($plan) = @_;
503 confess "You cannot unset the plan"
504 unless defined $plan;
506 confess "You cannot change the plan"
509 confess "'$plan' is not a valid plan! Plan must be an integer greater than 0, 'NO PLAN', or 'SKIP'"
510 unless $plan =~ m/^(\d+|NO PLAN|SKIP)$/;
512 $self->{+_PLAN} = $plan;
519 my $plan = $self->{+_PLAN} || return undef;
521 return 1 if $plan !~ m/^\d+$/;
523 return 1 if $plan == $self->{+COUNT};
816 output the final plan if the plan was 'NO PLAN'.
823 force C<< hub->finalize() >> to take action even if there is no plan, and no
835 Reset all state to the start. This sets the test count to 0, clears the plan,
859 =item $hub->plan($plan)
861 =item $plan = $hub->plan
863 Get or set the plan. The plan must be an integer larger than 0, the string
868 Check if the plan and counts match, but only if the tests have ended. If tests