Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-03 Thread Yitzchak Scott-Thoennes
On Sun, Jul 03, 2005 at 01:53:45PM +0200, demerphq wrote: > Actually about the only thing that seems to be really "hard" is doing > comparison of blessed regexes with overloaded stringification. For > that you need XS if you want it to work always. Now there's a sick idea. If blessed regexes with

[ANNOUNCE] Test::Simple/More/Builder 0.60_01

2005-07-03 Thread Michael G Schwern
http://www.pobox.com/~schwern/src/Test-Simple-0.60_01.tar.gz or http://svn.schwern.org/svn/CPAN/Test-Simple/trunk or a CPAN near you. I've made a lot of little, detailed changes in the last couple of days so I figured it would be nice to kick out an alpha. The big changes are: * Added the long d

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-03 Thread Andrew Pimlott
On Mon, Jul 04, 2005 at 12:36:29AM +0200, demerphq wrote: > On 7/3/05, Andrew Pimlott <[EMAIL PROTECTED]> wrote: > >Would using > > > > my $s = sub { $a->[0] = 1; $_[0]; } > > > > above also be "looking at refaddrs"? > > No. But it wouldnt be symmetric would it? It's no less symmetric tha

5.004_xx in the wild?

2005-07-03 Thread Michael G Schwern
I'm going through some work to restore Test::More and Test::Harness to work on 5.4.5, minor stuff really, and I'm wondering if its worth the trouble. Has anyone seen 5.004_xx in the wild? And if so, were people actively developing using it or was it just there to run some old code and they were a

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-03 Thread demerphq
On 7/3/05, Andrew Pimlott <[EMAIL PROTECTED]> wrote: > On Sun, Jul 03, 2005 at 12:32:01PM +0100, Fergal Daly wrote: > > On 7/3/05, Andrew Pimlott <[EMAIL PROTECTED]> wrote: > > > How about > > > > > > my $a = []; > > > my $b = []; > > > my $s = sub { $_[0] == $a; } > > > is_deeply($

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-03 Thread demerphq
On 7/3/05, Andrew Pimlott <[EMAIL PROTECTED]> wrote: > On Sun, Jul 03, 2005 at 01:53:45PM +0200, demerphq wrote: > > On 7/2/05, Andrew Pimlott <[EMAIL PROTECTED]> wrote: > > > On Sat, Jul 02, 2005 at 08:55:34AM +0200, demerphq wrote: > > > > The entire basis of computer science is based around the

Re: Putting a standardized import() into Test::Builder (was Re: Feedback from a first time Test module author.)

2005-07-03 Thread Michael G Schwern
On Sun, Jul 03, 2005 at 11:53:41AM +0200, demerphq wrote: > Maybe im missing something but that report has a comment that says: > > The trick is making sure it doesn't export when you say "use Test::Builder". > > If Test::Builder itself doesnt have anything in its @EXPORT/@EXPORT_OK > then why

Re: Feedback from a first time Test module author.

2005-07-03 Thread Michael G Schwern
On Sun, Jul 03, 2005 at 11:19:38AM +0200, demerphq wrote: > If the module > is intended to be used in conjunction with a GP test module like T::M > or T::S why should it even care about handling plan semantics at all? So that it can stand alone with or without Test::More. > > Something that is p

Re: Feedback from a first time Test module author.

2005-07-03 Thread Michael G Schwern
On Sun, Jul 03, 2005 at 04:16:25PM +0200, demerphq wrote: > On 7/3/05, Michael G Schwern <[EMAIL PROTECTED]> wrote: > > What framework is this? Oh, you mean Test::Simple::Catch? Its not really > > suitable for release. In fact the way I test Test::More is far inferior to > > things like Test::Bu

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-03 Thread Michael G Schwern
On Sun, Jul 03, 2005 at 01:53:45PM +0200, demerphq wrote: > Actually about the only thing that seems to be really "hard" is doing > comparison of blessed regexes with overloaded stringification. For > that you need XS if you want it to work always. Ow my BRAIN! -- Michael G Schwern [EMAIL P

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-03 Thread Fergal Daly
On 7/3/05, Andrew Pimlott <[EMAIL PROTECTED]> wrote: > How about > > my $a = []; > my $b = []; > my $s = sub { $_[0] == $a; } > is_deeply($a, $b); # passes > is_deeply($s->($a), $s->($b)); # fails Near the top of the last mail I said "there is nothing you can do

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-03 Thread Andrew Pimlott
On Sun, Jul 03, 2005 at 01:53:45PM +0200, demerphq wrote: > On 7/2/05, Andrew Pimlott <[EMAIL PROTECTED]> wrote: > > On Sat, Jul 02, 2005 at 08:55:34AM +0200, demerphq wrote: > > > The entire basis of computer science is based around the idea that if > > > you do the same operation to two items tha

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-03 Thread Andrew Pimlott
On Sun, Jul 03, 2005 at 12:32:01PM +0100, Fergal Daly wrote: > On 7/3/05, Andrew Pimlott <[EMAIL PROTECTED]> wrote: > > How about > > > > my $a = []; > > my $b = []; > > my $s = sub { $_[0] == $a; } > > is_deeply($a, $b); # passes > > is_deeply($s->($a), $s->($b));

Re: Feedback from a first time Test module author.

2005-07-03 Thread demerphq
On 7/3/05, demerphq <[EMAIL PROTECTED]> wrote: > On 7/3/05, Michael G Schwern <[EMAIL PROTECTED]> wrote: > > What framework is this? Oh, you mean Test::Simple::Catch? Its not really > > suitable for release. In fact the way I test Test::More is far inferior to > > things like Test::Builder::Test

Re: Feedback from a first time Test module author.

2005-07-03 Thread demerphq
On 7/3/05, Michael G Schwern <[EMAIL PROTECTED]> wrote: > What framework is this? Oh, you mean Test::Simple::Catch? Its not really > suitable for release. In fact the way I test Test::More is far inferior to > things like Test::Builder::Tester. Using the TBT approach would have saved > me from

Re: How to get started with Test::TAP::HTMLMatrix

2005-07-03 Thread Yuval Kogman
Docs are sucky due to lack of brainpower. See http://svn.openfoundry.org/pugs/util/ for some related stuff, namely yaml_harness and testgraph.pl, and http://nothingmuch.woobling.org/Test-TAP-HTMLMatrix/example.pl I'm working on some nice features for the next version, and they're actually don

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-03 Thread demerphq
On 7/2/05, Andrew Pimlott <[EMAIL PROTECTED]> wrote: > On Sat, Jul 02, 2005 at 08:55:34AM +0200, demerphq wrote: > > The entire basis of computer science is based around the idea that if > > you do the same operation to two items that are the same the end > > result is the same. > > Citing "comput

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-03 Thread demerphq
On 7/3/05, Fergal Daly <[EMAIL PROTECTED]> wrote: > I (and I think Yves) had always been thinking in terms of 2 structures > that had been produced independently, that is nothing in $a can be > part of $b but that's not realistic. In real test scripts, chunks of > the expected and the received valu

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-03 Thread demerphq
On 7/2/05, Eirik Berg Hanssen <[EMAIL PROTECTED]> wrote: > Fergal Daly <[EMAIL PROTECTED]> writes: > is_deeply($x, $y); # Equal, but "should" not be: > $x .= ""; # after the "same" modification > $y .= ""; # of the two things, they are > is_deeply($x, $y); # not equal! But its no

[ANNOUNCE] Test::NoWarnings 0.08

2005-07-03 Thread Fergal Daly
No change to the module but one of the test scripts needed fixing because it was doing something improper that used to be harmless but isn't anymore. F

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-03 Thread Fergal Daly
On 7/3/05, Andrew Pimlott <[EMAIL PROTECTED]> wrote: > On Sat, Jul 02, 2005 at 07:34:47PM +0100, Fergal Daly wrote: > > On 7/2/05, Andrew Pimlott <[EMAIL PROTECTED]> wrote: > > > Citing "computer science" as the basis of your position is just too > > > much. The "computer science" answer to the co

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-03 Thread Fergal Daly
See my reply to Andrew for the $a."" stuff and see my reply a long time ago when I also said that is_deeply should stay the same (both for this case and others). I'm just defending the idea that such a comparison is self-consistent, possible and useful, F On 7/2/05, Eirik Berg Hanssen <[EMAIL PR

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-03 Thread Eirik Berg Hanssen
Fergal Daly <[EMAIL PROTECTED]> writes: > The point about modification is that if 2 things start out equal to > one another and they are modified in the same way then they should > still be equal to one-another. That implies that two array refs are not equal: use Test::More 'no_plan'; $x = [

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-03 Thread Yitzchak Scott-Thoennes
On Sat, Jul 02, 2005 at 12:24:12AM -0700, chromatic wrote: > On Sat, 2005-07-02 at 08:55 +0200, demerphq wrote: > > > The entire basis of computer science is based around the idea that if > > you do the same operation to two items that are the same the end > > result is the same. Without this ther

Putting a standardized import() into Test::Builder (was Re: Feedback from a first time Test module author.)

2005-07-03 Thread demerphq
On 7/3/05, Michael G Schwern <[EMAIL PROTECTED]> wrote: > > Another issue I had is that its not particularly clear what the deal > > is with an import method per package. Why is it necessary to recode > > (slightly differently everywhere) the import routine? I personally > > would have found it muc

Re: Feedback from a first time Test module author.

2005-07-03 Thread demerphq
On 7/3/05, Michael G Schwern <[EMAIL PROTECTED]> wrote: > On Sun, Jul 03, 2005 at 09:10:51AM +0200, demerphq wrote: > > Ive been putting together a Test:: module to handle the kind of deep > > comparison that I think is_deeply should do. Ive noticed some minor > > issues with the process. > > Than

Re: Feedback from a first time Test module author.

2005-07-03 Thread Michael G Schwern
On Sun, Jul 03, 2005 at 10:04:52AM +0200, demerphq wrote: > Well, its more what i was trying to do. Just ask yourself "how do a i > write module that is exactly like Test::More except one of the tests > has overloaded behaviour? You don't. I love that answer. You write your module with its one e

Re: Feedback from a first time Test module author.

2005-07-03 Thread Michael G Schwern
On Sun, Jul 03, 2005 at 09:10:51AM +0200, demerphq wrote: > Ive been putting together a Test:: module to handle the kind of deep > comparison that I think is_deeply should do. Ive noticed some minor > issues with the process. Thank you. I get very little feedback in this regard and appreciate it.

Re: Feedback from a first time Test module author.

2005-07-03 Thread demerphq
On 7/3/05, Randy W. Sims <[EMAIL PROTECTED]> wrote: > demerphq wrote: > > Im so far going with the strategy that my module replaces Test::More > > with itself. I decided not to overload any of its behaviour either and > > just add an extra method. > > I think it would be much more usefull to have

Re: Feedback from a first time Test module author.

2005-07-03 Thread Randy W. Sims
demerphq wrote: Im so far going with the strategy that my module replaces Test::More with itself. I decided not to overload any of its behaviour either and just add an extra method. I think it would be much more usefull to have your module work with rather than in place of Test::More. I can't

Re: Feedback from a first time Test module author.

2005-07-03 Thread demerphq
On 7/3/05, chromatic <[EMAIL PROTECTED]> wrote: > On Sun, 2005-07-03 at 09:10 +0200, demerphq wrote: > > > Anyway, maybe ive gotten this all muddled and these arent issues > > people should worry about for some good reason or another. > > I certainly have a fuzzy idea of what you've done to run i

Re: Feedback from a first time Test module author.

2005-07-03 Thread chromatic
On Sun, 2005-07-03 at 09:10 +0200, demerphq wrote: > Anyway, maybe ive gotten this all muddled and these arent issues > people should worry about for some good reason or another. I certainly have a fuzzy idea of what you've done to run into these problems. Can you post your code somewhere for re

Feedback from a first time Test module author.

2005-07-03 Thread demerphq
Ive been putting together a Test:: module to handle the kind of deep comparison that I think is_deeply should do. Ive noticed some minor issues with the process. Writing test modules isn't well explained. The pointers to look at other modules are IMO not too helpful. You have to spend quite a whil