Skip to content

Commit 258985d

Browse files
committed
Fix the test plan
1 parent 65f36ba commit 258985d

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

dist/ExtUtils-CBuilder/t/03-cplusplus.t

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ use File::Spec;
1616
my $quiet = $ENV{PERL_CORE} && !$ENV{HARNESS_ACTIVE};
1717
my ($source_file, $object_file, $lib_file);
1818

19+
my $b = ExtUtils::CBuilder->new(quiet => $quiet);
20+
21+
# test plan
22+
if ( ! $b->have_cplusplus ) {
23+
plan skip_all => "no compiler available for testing";
24+
}
25+
else {
26+
plan tests => 7;
27+
}
28+
1929
{
2030
# GH #23146
2131
my $fake_cc = File::Spec->rel2abs(File::Spec->catfile(qw(some directory what doesnt exist), 'cc'));
@@ -29,16 +39,6 @@ my ($source_file, $object_file, $lib_file);
2939
is $cb->{config}{cxx}, $fake_cc, "did not search PATH for C++ compiler when given absolute path to C compiler";
3040
}
3141

32-
my $b = ExtUtils::CBuilder->new(quiet => $quiet);
33-
34-
# test plan
35-
if ( ! $b->have_cplusplus ) {
36-
plan skip_all => "no compiler available for testing";
37-
}
38-
else {
39-
plan tests => 7;
40-
}
41-
4242
ok $b->have_cplusplus, "have_cplusplus";
4343

4444
$source_file = File::Spec->catfile('t', 'cplust.cc');

0 commit comments

Comments
 (0)