Skip Menu |

This queue is for tickets about the Math-Combinatorics CPAN distribution.

Report information
The Basics
Id: 44257
Status: new
Priority: 0/
Queue: Math-Combinatorics

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

Bug Information
Severity: Important
Broken in: 0.09
Fixed in: (no value)



Subject: running same sequence of commands results in different ordering of outcome
Run this script: #!/usr/bin/perl use strict; use warnings; use Math::Combinatorics; use Test::More tests => 2; test(); test(); sub test { my $c = Math::Combinatorics->new( count => 2, data => [qw(a b c)] ); my @result; while(my @combo = $c->next_combination()){ push(@result, join('', @combo)); } is_deeply([@result], [qw(ab ac bc)]); } And you'll get: 1..2 ok 1 not ok 2 # Failed test in ./proveMathCombFails.pl at line 21. # Structures begin differing at: # $got->[0] = 'cb' # $expected->[0] = 'ab' # Looks like you failed 1 test of 2. Which means the same test succeeds first and then fails.