True. I usually expose "deep" objects by methods rather than hash
access, so it's not really a problem for the majority of my code.
Adrian
On Friday, February 28, 2003, at 03:54 pm, [EMAIL PROTECTED] wrote:
On Fri, Feb 28, 2003 at 11:51:07AM +, Adrian Howard wrote:
Option three.
isa_ok
On Fri, Feb 28, 2003 at 11:51:07AM +, Adrian Howard wrote:
> Option three.
>
>isa_ok($obj, 'MyClass');
>is_deeply($obj, { foo => 42, bar => 23 });
This is, unfortunately, shallow. It won't compare objects inside $obj.
On Thursday, February 27, 2003, at 09:21 pm, Fergal Daly wrote:
On Thursday 27 February 2003 20:54, [EMAIL PROTECTED] wrote:
On Thu, Feb 27, 2003 at 05:32:42PM +, Fergal Daly wrote:
I think that although a test that ignores blessed classes could be
handy
in some circumstances (ie programming
I'd go for feature, not bug. For me is_deeply has always been for
testing structure. We have isa_ok for checking class identity.
Having one that tested for both might be useful, but I would not change
the behaviour of is_deeply.
Adrian
On Thursday, February 27, 2003, at 05:32 pm, Fergal Daly
On Thu, Feb 27, 2003 at 10:03:50PM +, Fergal Daly wrote:
> > > - let _deep_check take it's cue from the second argument. If the second
> > > argument is blessed then be strict about the classes, if it's unblessed
> > > then ignore the classes. This should happen at all levels in the
> > > stru
On Thu, Feb 27, 2003 at 09:21:09PM +, Fergal Daly wrote:
> > I am already not yet convinced. In particular, it makes this sort of test
> > more difficult than it needs be:
> >
> > is_deeply($obj, { foo => 42, bar => 23 });
>
> Absolutely, but there is currently no way to do this
>
> is_d
On Thu, Feb 27, 2003 at 05:32:42PM +, 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 context of
> test suites it's a bug.
I am already not yet convinced. In particular, it mak
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 you need
On Thursday 27 February 2003 21:35, [EMAIL PROTECTED] wrote:
> On Thu, Feb 27, 2003 at 09:21:09PM +, 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 is blessed then be strict ab
On Thursday 27 February 2003 20:54, [EMAIL PROTECTED] wrote:
> On Thu, Feb 27, 2003 at 05:32:42PM +, 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
> > context of test suites
On Mon, Sep 30, 2002 at 09:12:14AM +0200, H.Merijn Brand wrote:
> use_ok ("Test::More");
> is ($Test::More::VERSION, 0.47, "Test::More version check");
>
> ain't quite the same either.
> Some of my tests indeed *require* a certain version of some::module.
> Someting to add to Test::More?
Requi
On Sat 28 Sep 2002 03:25, Michael G Schwern <[EMAIL PROTECTED]> wrote:
> On Tue, Sep 24, 2002 at 05:57:41PM +0200, H.Merijn Brand wrote:
> > 1. use_ok should have an entry in the manual for minimal version
> >
> > use_ok ("Test::More", 0.47);
>
> This currently doesn't work quite right. Obs
On Tue, Sep 24, 2002 at 05:57:41PM +0200, H.Merijn Brand wrote:
> 1. use_ok should have an entry in the manual for minimal version
>
> use_ok ("Test::More", 0.47);
This currently doesn't work quite right. Observe...
$ perl -MTest::More -wle 'plan tests => 1; use_ok("Text::Soundex", 0.20
Op een mooie herfstdag (Tuesday 24 September 2002 17:57), schreef H.Merijn
Brand:
> 2. I'm testing conversions to and from Unicode
>
> --8<---
> use Test::More tests => 86;
>
> use strict;
>
> BEGIN {
> use_ok ("PROCURA::Diac", 4.12);
> SKIP: {
> $^V ge v5.8.0 or skip "Need 5.8.0
On Sat, Aug 31, 2002 at 02:05:53PM +0200, Elizabeth Mattijsen wrote:
> >$ perl -Mblib -wle 'use AutoExample; print "Yes" if
> >AutoExample->can("foo")'
> >Using /home/schwern/tmp/AutoExample/blib
> >Yes
>
> Hmmm... I'm doing BEGIN { use_ok( 'Thread::Pool' ) }... Maybe there is a
> difference
At 02:38 PM 8/30/02 -0700, Michael G Schwern wrote:
>On Fri, Aug 30, 2002 at 04:01:11PM +0200, Elizabeth Mattijsen wrote:
> > Is there an easy way to check methods, whose loading is deferred with
> > AutoLoader, with the can_ok() check?
>Nope. You have to create stubs. The AutoLoader module shou
On Fri, Aug 30, 2002 at 04:01:11PM +0200, Elizabeth Mattijsen wrote:
> Is there an easy way to check methods, whose loading is deferred with
> AutoLoader, with the can_ok() check?
Nope. You have to create stubs. The AutoLoader module should do this
automatically for you assuming you've gone th
On Mon, Dec 10, 2001 at 11:19:21PM +, Adrian Howard wrote:
> > I'm planning on using diag().
> >
> > ok( $foo == $bar ) || diag 'blah blah';
> >
> > it has nice mnemonics with:
> >
> > open(FOO, "bar") || die 'blah blah';
> >
> > "ok or diag" "open or die"
> >
> > Thoughts?
>
> Little to
Hi,
Newbie with Test::More --- and loving it :-)
on 10/12/01 12:04 pm, Michael G Schwern at [EMAIL PROTECTED] wrote:
> Its been on the Test::More todo list to have a blessed way to do:
>
> print STDOUT "# here's some extra info\n";
>
> I'm planning on using diag().
>
> ok( $foo == $bar ) ||
On Sun, Oct 07, 2001 at 03:57:48PM -0400, Kirrily 'Skud' Robert wrote:
> Also, there's some weirdness with webchatpp's generated code if your
> WWW::Chat script was inside subroutines (or presumably other blocks).
> Here's a real life example:
> [snippage]
> It would be nice if we could get this t
On Sun, Oct 07, 2001 at 07:06:45PM -0400, Michael G Schwern said:
> > Both Test::More and WWW::Chat export a routine called fail(). This
> > makes it rather hard to write tests for web stuff using both these
> > modules.
>
> I can solve this from my end by providing control over Test::More's
> i
On Sun, Oct 07, 2001 at 07:06:45PM -0400, Michael G Schwern said:
> On Sun, Oct 07, 2001 at 03:57:48PM -0400, Kirrily 'Skud' Robert wrote:
> > Both Test::More and WWW::Chat export a routine called fail(). This
> > makes it rather hard to write tests for web stuff using both these
> > modules.
>
On Sun, Oct 07, 2001 at 03:57:48PM -0400, Kirrily 'Skud' Robert wrote:
> Both Test::More and WWW::Chat export a routine called fail(). This
> makes it rather hard to write tests for web stuff using both these
> modules.
I can solve this from my end by providing control over Test::More's
imported
On Sun, Aug 26, 2001 at 12:06:16PM +0100, Nicholas Clark wrote:
> With Test::More should I be able to do this:
>
> is (scalar , undef, "should read undef as we are at eof");
The new versions on CPAN handle this. I just have to get around to
patching it into the core. Stuff moved around and it'
On Sun, Aug 26, 2001 at 12:06:16PM +0100, Nicholas Clark wrote:
> With Test::More should I be able to do this:
> is (scalar , undef, "should read undef as we are at eof");
This was fixed in a recent version
> sub is ($$;$) {
> my($this, $that, $name) = @_;
>
> my $ok = @_ == 3 ? ok($thi
25 matches
Mail list logo