Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Test-Deep CPAN distribution.

Report information
The Basics
Id: 72296
Status: rejected
Priority: 0/
Queue: Test-Deep

People
Owner: Nobody in particular
Requestors: heiko [...] hexco.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Attachments
Test-Deep-0.110_SparseArrayPatch.tar.gz



Subject: Test::Deep and array comparisons
Date: Mon, 04 Jul 2011 21:08:27 +0200
To: rjbs [...] cpan.org
From: Heiko <heiko [...] hexco.de>
Download (untitled) / with headers
text/plain 678b
Hello Ricardo, I like your CPAN-Module Test::Deep and use it in my test scripts effectively. Thanks for your work! I had the idea that cmp_deeply could be improved when comparing arrays. After the length check of both arrays, a check for assigned slots could be added before the values finally are compared. A demo to illustrate my point: use Test::Deep; my @a = (undef, 1); my @b; $b[1] = 1; # @a has two assigned values # @b has one assigned value if (exists $a[0] != exists $b[0]) { print "different assignment status for index 0\n"; } cmp_deeply(\@a, \@b, "cmp_deeply sees them as equal"); What do you think about that? best regards, Heiko (aka hexcoder)
Subject: Test::Deep and array comparisons [Patch]
Download (untitled) / with headers
text/plain 236b
I added 2 new test cases to array.t and modified ArrayElementsOnly.pm to succeed the tests. Please consider the patch for inclusion. (I admit, I failed to make my own SC special comparison for this case). Thanks for your work, hexcoder
Subject: Test-Deep-0.110_SparseArrayPatch.tar.gz

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 457b
Hi! First off, sorry about the long delay in replying. This module has sort of been on ice for some time. The documentation on the use of delete/exists on array elements (to which I contributed) is fairly strongly against using these. I agree: don't test for this stuff. It will almost certainly lead to sorrow. That said: It should be easy to write your own version of array tests that do this sort of thing, if you really want or need it. -- rjbs
Subject: AW: [rt.cpan.org #72296] Test::Deep and array comparisons
Date: Mon, 7 Nov 2016 11:45:08 +0000
To: "bug-Test-Deep [...] rt.cpan.org" <bug-Test-Deep [...] rt.cpan.org>, "heiko [...] hexco.de" <heiko [...] hexco.de>
From: "Eissfeldt, Heiko" <heiko.eissfeldt [...] siemens.com>
Thanks, i just wanted to compare the complete state of two arrays (including the 'definedness' of its elements) and knew no other way to do that. You seem to think that this is not a general useful requirement. I wished otherwise but I accept that. Best regards, Heiko Show quoted text
-----Urspr√ľngliche Nachricht----- Von: Ricardo Signes via RT [mailto:bug-Test-Deep@rt.cpan.org] Gesendet: Sonntag, 6. November 2016 03:01 An: heiko@hexco.de Betreff: [rt.cpan.org #72296] Test::Deep and array comparisons <URL: https://rt.cpan.org/Ticket/Display.html?id=72296 > Hi! First off, sorry about the long delay in replying. This module has sort of been on ice for some time. The documentation on the use of delete/exists on array elements (to which I contributed) is fairly strongly against using these. I agree: don't test for this stuff. It will almost certainly lead to sorrow. That said: It should be easy to write your own version of array tests that do this sort of thing, if you really want or need it. -- rjbs


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.