Skip Menu |

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

Report information
The Basics
Id: 44258
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: Calculating same value twice results in different ordering of outcome
Run this test: #!/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 very same test succeeds first and then fails in the second run.