Skip Menu |

This queue is for tickets about the Games-Messages CPAN distribution.

Report information
The Basics
Id: 24963
Status: new
Priority: 0/
Queue: Games-Messages

People
Owner: Nobody in particular
Requestors: stennie [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.05
Fixed in: (no value)



Subject: t/02-random-tests.t failure .. tried to plan more than once
t/02-random-tests.t fails with: You tried to plan twice at t/02-random-tests.t line 3. Diff and corrected test attached. Cheers, Stephen
Subject: 02-random-tests.t
use Test::More; eval "use Test::RandomResults 0.01"; if ($@) { plan skip_all => "Test::RandomResults 0.01 required for testing non-deterministic functions"; } else { plan tests => 26; } BEGIN { use_ok('Games::Messages',':all') }; ok(! player_wins ( ) ); my ($player, $winner, $loser) = qw/player winner loser/; length_gt(player_wins($player), 2); length_lt(player_wins($player), 99); like (player_wins($player), qr/\w|:/); length_gt(player_loses($player), 2); length_lt(player_loses($player), 99); like (player_loses($player), qr/\w|:/); length_gt(computer_beats_computer(), 2); length_lt(computer_beats_computer(), 99); like (computer_beats_computer(), qr/\w|:/); length_gt(computer_beats_player($player), 2); length_lt(computer_beats_player($player), 99); like (computer_beats_player($player), qr/\w|:/); length_gt(player_beats_computer($player), 2); length_lt(player_beats_computer($player), 99); like (player_beats_computer($player), qr/\w|:/); length_gt(player_beats_player($winner, $loser), 2); length_lt(player_beats_player($winner, $loser), 99); like (player_beats_player($winner, $loser), qr/\w|:/); length_gt(player_is_idle($player), 2); length_lt(player_is_idle($player), 99); like (player_is_idle($player), qr/\w|:/); length_gt(player_exagerates($player), 2); length_lt(player_exagerates($player), 99); like (player_exagerates($player), qr/\w|:/);
Subject: t.diff
--- t/02-random-tests.t.dist 2005-11-04 10:50:19.000000000 +1100 +++ t/02-random-tests.t 2007-02-15 20:40:09.000000000 +1100 @@ -1,6 +1,12 @@ -use Test::More tests => 26; +use Test::More; + eval "use Test::RandomResults 0.01"; -plan skip_all => "Test::RandomResults 0.01 required for testing non-deterministic functions" if $@; + +if ($@) { + plan skip_all => "Test::RandomResults 0.01 required for testing non-deterministic functions"; +} else { + plan tests => 26; +} BEGIN { use_ok('Games::Messages',':all') };