Skip to content

Commit

Permalink
better failure-reporting in test
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Mar 23, 2021
1 parent 86e0d4f commit f00dcbb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions t/fftw.t
Original file line number Diff line number Diff line change
Expand Up @@ -861,15 +861,19 @@ done_testing;
sub ok_should_make_plan
{
my ($value, $planname) = @_;
ok( $value, $planname );
local $Test::Builder::Level = $Test::Builder::Level + 1;
my $ret = ok( $value, $planname );
check_new_plan( $planname );
$ret;
}

sub ok_should_reuse_plan
{
my ($value, $planname) = @_;
ok( $value, $planname );
local $Test::Builder::Level = $Test::Builder::Level + 1;
my $ret = ok( $value, $planname );
check_reused_plan( $planname );
$ret;
}

sub check_new_plan
Expand All @@ -878,6 +882,7 @@ sub check_new_plan

SKIP: {
skip "Plan creation checks disabled because pdl memory may be unaligned", 1 unless $do_check_plan_creations;
local $Test::Builder::Level = $Test::Builder::Level + 1;
ok( $PDL::FFTW3::_Nplans == $Nplans+1,
"$planname: should make a new plan" );
}
Expand All @@ -891,6 +896,7 @@ sub check_reused_plan

SKIP: {
skip "Plan creation checks disabled because pdl memory may be unaligned", 1 unless $do_check_plan_creations;
local $Test::Builder::Level = $Test::Builder::Level + 1;
ok( $PDL::FFTW3::_Nplans == $Nplans,
"$planname: should reuse an existing plan" );
}
Expand Down

0 comments on commit f00dcbb

Please sign in to comment.