On Wed, Apr 10, 2002 at 02:03:51PM +0100, Nicholas Clark wrote:
> On Wed, Apr 10, 2002 at 08:57:30PM +0900, Curt Sampson wrote:
> > On Wed, 10 Apr 2002, Mark Fowler wrote:
> > 
> > > On Wed, 10 Apr 2002, Curt Sampson wrote:
> > >
> > > eq_set() is really bag comparison.
> > 
> > Well, my point was, it *is* a set comparison if you pass it sets.
> > The problem, in my view, is that perl lets you pass it something
> > which is not a set. Thus, it seems perfectly fair to me for it to
> > produce undefined behaviour under such circumstances.
> 
> The API doesn't define which side is "expected" and which side "got",
> does it?

eq_set() is not a test function.  It doesn't produce "ok/not ok" and
shows no diagnostics.  It just returns true if they're equal, false
otherwise.  So there's no concept of which is "expected" and which is
"got" anymore than:

    $got eq $expected
    $expected eq $got


Test::More's eq_set() is just a bad name.  Don't fixate on it, write
Test module with better set handling.


-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl Quality Assurance      <[EMAIL PROTECTED]>         Kwalitee Is Job One
It's Flypaper Licking time!

Reply via email to