Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Re: Test::More - equal_set

by edoc (Chaplain)
on Jun 01, 2003 at 02:23 UTC ( [id://262164]=note: print w/replies, xml ) Need Help??


in reply to Re: Test::More - equal_set
in thread Test::More - equal_set

ok, knew there had to be something out there... Test::Deep using 'bag' (or set maybe, they look the same in the docs..) Unfortunately it doesn't seem to be a standard Perl module.

#!/usr/bin/perl use Test::More qw(no_plan); use Test::Deep; my (@this,@that); @this = ( { fred => 1 }, { wilma => 1 } ); @that = ( { wilma => 1 }, { fred => 1 } ); cmp_deeply(\@this, bag(@that), 'cmp_deeply Deep Order Diff');

cheers,

J

Replies are listed 'Best First'.
Re: Test::More - equal_set
by brewer (Sexton) on Jun 01, 2003 at 16:12 UTC

    Thanks again, It looks like I don't get to write anything - cmp_bag() from Test::Deep gives me one more passed test.

    I'm really starting to see the value in writing tests - I may try writing the tests before the code for the next itch that I scratch.

    Kind regards,

    brewer

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://262164]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-25 19:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found