mmm.. I been bit by this, but I think it's what you could call a bug in the Test::More docs.. maybe, depending on how you read it..

"This is a deep check, but the irrelevancy of order only applies to the top level."

Basically, the test below shows that order doesn't matter for a shallow test, but once you have more than the "top level", order does matter.

#!/usr/bin/perl use Test::More qw(no_plan); my (@this,@that); @this = ('Fred','Wilma'); @that = ('Fred','Wilma'); ok(eq_set(\@this, \@that), 'Shallow Order Same'); @this = ('Fred','Wilma'); @that = ('Wilma','Fred'); ok(eq_set(\@this, \@that), 'Shallow Order Diff'); @this = ( { fred => 1 }, { wilma => 1 } ); @that = ( { fred => 1 }, { wilma => 1 } ); ok(eq_set(\@this, \@that), 'Deep Order Same'); @this = ( { fred => 1 }, { wilma => 1 } ); @that = ( { wilma => 1 }, { fred => 1 } ); ok(eq_set(\@this, \@that), 'Deep Order Diff'); __END__ prints: ok 1 - Shallow Order Same ok 2 - Shallow Order Diff ok 3 - Deep Order Same not ok 4 - Deep Order Diff # Failed test (testmore.pl at line 21) 1..4 # Looks like you failed 1 tests of 4.

cheers,

J


In reply to Re: Test::More - equal_set by edoc
in thread Test::More - equal_set by brewer

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":