On Thursday 27 February 2003 21:35, [EMAIL PROTECTED] wrote:
> On Thu, Feb 27, 2003 at 09:21:09PM +0000, Fergal Daly wrote:
>
> Or even better, cmp_objects().
Yep, sounds better.
> > - let _deep_check take it's cue from the second argument. If the second
> > argument
On Thursday 27 February 2003 16:40, [EMAIL PROTECTED] wrote:
> > is_deeply() ignores the classes of blessed refs. So
> >
> > perl -MTest::More=no_plan -e 'is_deeply(bless([], "a"), bless([], "b"))'
> >
> > passes,
>
> Oh. Not sure if that's a bug or a feature. Discuss it on perl-qa.
I think that
f $this and $that are equal as sets and false otherwise.
=cut
sub eq_math_set {
my ($this, $that) = @_;
my ($extra, $missing) = _diff_bagset($this, $that, 1);
(@$extra or @$missing) ? 0 : 1;
}
=item B
eq_bag([EMAIL PROTECTED], [EMAIL PROTECTED]);
This performs the same test as is_bag b
There's a line missing from Test::More::_deep_check(). It results in funny
diagnostics after comparing scalar refs, so
perl -MTest::More=no_plan -e 'is_deeply([(\"a") x 5, "b"], [(\"a") x 5, "c"])'
gives
# Structures begin differing at:
# $got->[0][1][2][3][4][5] = 'b'
# $exp
On Thursday 27 February 2003 20:54, [EMAIL PROTECTED] wrote:
> On Thu, Feb 27, 2003 at 05:32:42PM +0000, Fergal Daly wrote:
> > I think that although a test that ignores blessed classes could be handy
> > in some circumstances (ie programming in general), I reckon in the
> > c
This patch lets Test::More compare circular data structures.
Get the latest version (0.47) of Test::More, apply fixes.patch to fix some
issues, then apply circular.patch. Test with circular.t,
F
--
Do you need someone with lots of Unix sysadmin and/or lots of OO software
development experienc
On Friday 28 February 2003 12:23, Adrian Howard wrote:
> Comments:
>
> - I'd prefer is_set rather than is_math_set
So would I but eq_set is already taken by Test::More and I want to name the
is_ and the eq_ functions conistently
> - I'd like shallow comparison options as well as deep one
On Thursday 27 February 2003 22:03, Fergal Daly wrote:
> Would it be acceptable to add a third argument to _deep_check to switch
> on/off bless checking, rather than having to reimplement the whole thing?
Below is a very simple patch to do that. That makes cmp_object very easy
F
--
Do yo
Final one tonight!
eq_array and eq_hash don't tidy up after themselves. You would have to be very
unfortunate to be stung by this problem but potentially you could end up with
extra references to some of your variables which could effect tests further
on due to DESTROYs not being called or what
I'm writing test a test module and naturally I want to test it. 2 minutes ago
I discovered Test::Builder::Tester but before finding that I spent several
hours inventing a slightly different wheel... twice.
The result is Test::Tester
http://www.fergaldaly.com/computer/Test-Tester/
It's not com
perl -MTest::More=no_plan -e 'is_deeply({}, {key => []})'
should fail but doesn't because $DNE is deeply equal to [] and _deep_check
doesn't notice the class difference.
Patch attached.
F
--
Do you need someone with lots of Unix sysadmin and/or lots of OO software
development experience? Go
Hi,
I've just uploaded Test::Deep 0.02 to CPAN. This module is a very souped up
version of the is_deeply() test from Test::More. If you don't include an
special comparison instructions, it behaves exactly like is_deeply() except
it handles circular data structures and it compares the cla
12 matches
Mail list logo