Skip to content

Commit 8c06163

Browse files
committed
Thread::Semaphore: clean up some tests
Some of the tests (02_errs.t, 03_nothreads.t) already use Test::More unconditionally, so remove the conditional loading code from the other tests.
1 parent 6d84e5d commit 8c06163

File tree

4 files changed

+4
-32
lines changed

4 files changed

+4
-32
lines changed

dist/Thread-Semaphore/t/01_basic.t

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,7 @@ BEGIN {
1212
use threads;
1313
use threads::shared;
1414
use Thread::Semaphore;
15-
16-
if ($] == 5.008) {
17-
require './t/test.pl'; # Test::More work-alike for Perl 5.8.0
18-
} else {
19-
require Test::More;
20-
}
21-
Test::More->import();
22-
plan('tests' => 10);
15+
use Test::More 'tests' => 10;
2316

2417
### Basic usage with multiple threads ###
2518

dist/Thread-Semaphore/t/04_nonblocking.t

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,7 @@ BEGIN {
1212
use threads;
1313
use threads::shared;
1414
use Thread::Semaphore;
15-
16-
if ($] == 5.008) {
17-
require './t/test.pl'; # Test::More work-alike for Perl 5.8.0
18-
} else {
19-
require Test::More;
20-
}
21-
Test::More->import();
22-
plan('tests' => 12);
15+
use Test::More 'tests' => 12;
2316

2417
### Basic usage with multiple threads ###
2518

dist/Thread-Semaphore/t/05_force.t

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,7 @@ BEGIN {
1212
use threads;
1313
use threads::shared;
1414
use Thread::Semaphore;
15-
16-
if ($] == 5.008) {
17-
require './t/test.pl'; # Test::More work-alike for Perl 5.8.0
18-
} else {
19-
require Test::More;
20-
}
21-
Test::More->import();
22-
plan('tests' => 8);
15+
use Test::More 'tests' => 8;
2316

2417
### Basic usage with multiple threads ###
2518

dist/Thread-Semaphore/t/06_timed.t

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,7 @@ BEGIN {
1212
use threads;
1313
use threads::shared;
1414
use Thread::Semaphore;
15-
16-
if ($] == 5.008) {
17-
require 't/test.pl'; # Test::More work-alike for Perl 5.8.0
18-
} else {
19-
require Test::More;
20-
}
21-
Test::More->import();
22-
plan('tests' => 10);
15+
use Test::More 'tests' => 10;
2316

2417
### Basic usage with multiple threads ###
2518

0 commit comments

Comments
 (0)