File tree 8 files changed +11
-76
lines changed
8 files changed +11
-76
lines changed Original file line number Diff line number Diff line change 1
1
use strict;
2
2
use warnings;
3
3
4
+ use Config;
4
5
BEGIN {
5
- use Config;
6
6
if (! $Config {' useithreads' }) {
7
7
print (" 1..0 # SKIP Perl not compiled with 'useithreads'\n " );
8
8
exit (0);
@@ -11,16 +11,7 @@ BEGIN {
11
11
12
12
use threads;
13
13
use Thread::Queue;
14
-
15
- BEGIN { # perl RT 133382
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
- } # end BEGIN
23
- plan(' tests' => 81);
14
+ use Test::More ' tests' => 81;
24
15
25
16
# ## Basic usage with multiple threads ###
26
17
Original file line number Diff line number Diff line change 1
1
use strict;
2
2
use warnings;
3
3
4
+ use Config;
4
5
BEGIN {
5
- use Config;
6
6
if (! $Config {' useithreads' }) {
7
7
print (" 1..0 # SKIP Perl not compiled with 'useithreads'\n " );
8
8
exit (0);
@@ -12,16 +12,7 @@ BEGIN {
12
12
use threads;
13
13
use threads::shared;
14
14
use Thread::Queue;
15
-
16
- BEGIN { # perl RT 133382
17
- if ($] == 5.008) {
18
- require ' t/test.pl' ; # Test::More work-alike for Perl 5.8.0
19
- } else {
20
- require Test::More;
21
- }
22
- Test::More-> import ();
23
- } # end BEGIN
24
- plan(' tests' => 46);
15
+ use Test::More ' tests' => 46;
25
16
26
17
# Regular array
27
18
my @ary1 = qw/ foo bar baz/ ;
Original file line number Diff line number Diff line change 1
1
use strict;
2
2
use warnings;
3
3
4
+ use Config;
4
5
BEGIN {
5
- use Config;
6
6
if (! $Config {' useithreads' }) {
7
7
print (" 1..0 # SKIP Perl not compiled with 'useithreads'\n " );
8
8
exit (0);
@@ -11,16 +11,7 @@ BEGIN {
11
11
12
12
use threads;
13
13
use Thread::Queue;
14
-
15
- BEGIN { # perl RT 133382
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
- } # end BEGIN
23
- plan(' tests' => 19);
14
+ use Test::More ' tests' => 19;
24
15
25
16
my $q = Thread::Queue-> new(1..10);
26
17
ok($q , ' New queue' );
Original file line number Diff line number Diff line change @@ -11,16 +11,7 @@ BEGIN {
11
11
12
12
use threads;
13
13
use Thread::Queue;
14
-
15
- BEGIN { # perl RT 133382
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
- } # end BEGIN
23
- plan(' tests' => 20);
14
+ use Test::More ' tests' => 20;
24
15
25
16
my $q = Thread::Queue-> new(1..10);
26
17
ok($q , ' New queue' );
Original file line number Diff line number Diff line change @@ -11,16 +11,7 @@ BEGIN {
11
11
12
12
use threads;
13
13
use Thread::Queue;
14
-
15
- BEGIN { # perl RT 133382
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
- } # end BEGIN
23
- plan(' tests' => 16);
14
+ use Test::More ' tests' => 16;
24
15
25
16
my $q = Thread::Queue-> new(1..10);
26
17
ok($q , ' New queue' );
Original file line number Diff line number Diff line change @@ -12,16 +12,7 @@ BEGIN {
12
12
use threads;
13
13
use Thread::Queue;
14
14
use Thread::Semaphore;
15
-
16
- BEGIN { # perl RT 133382
17
- if ($] == 5.008) {
18
- require ' t/test.pl' ; # Test::More work-alike for Perl 5.8.0
19
- } else {
20
- require Test::More;
21
- }
22
- Test::More-> import ();
23
- } # end BEGIN
24
- plan(' tests' => 3);
15
+ use Test::More ' tests' => 3;
25
16
26
17
# The following tests locking a queue
27
18
Original file line number Diff line number Diff line change @@ -11,16 +11,7 @@ BEGIN {
11
11
12
12
use threads;
13
13
use Thread::Queue;
14
-
15
- BEGIN { # perl RT 133382
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
- } # end BEGIN
23
- plan(' tests' => 19);
14
+ use Test::More ' tests' => 19;
24
15
25
16
# ## ->dequeue_timed(TIMEOUT, COUNT) test ###
26
17
Original file line number Diff line number Diff line change @@ -17,9 +17,7 @@ BEGIN {
17
17
use threads;
18
18
use Thread::Queue;
19
19
20
- use Test::More;
21
-
22
- plan tests => 13;
20
+ use Test::More tests => 13;
23
21
24
22
my $q = Thread::Queue-> new();
25
23
my $rpt = Thread::Queue-> new();
You can’t perform that action at this time.
0 commit comments