Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 2655
Status: resolved
Priority: 0/
Queue: Test-Simple

People
Owner: Nobody in particular
Requestors: mark [...] summersault.com
MichaelRWolf [...] att.net
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.48_01
Fixed in: (no value)



Subject: docs for "is" better as ($got,$expected) than ($this,$that)
The is() function of Test::More provides useful feedback by telling you want it "got" and what it "expected". However, based on the documentation, it's easy to put in the "got" value in the place where the "expected" value is assumed to me. I think this this is easily addressed by updating the docs to replace constructs like this: is($this,$that) with is($got,$expected) This will make the diagnostic output less confusing in some cases. Thanks!
Subject: replace this/that with expected/actual in POD
Given that the extended output mentions "got" and "expected", the documentation should be more instructive than "this" and "that" for parameters. P.S. I'd be glad to do the work.
Date: Mon, 09 Aug 2004 18:11:58 -0700
From: "Michael R. Wolf" <MichaelRWolf [...] att.net>
To: bug-Test-Harness [...] rt.cpan.org
Subject: Re: [cpan #7305] AutoReply: replace this/that with expected/actual in POD
RT-Send-Cc:
Oops. This should have gone to Test-More. Test-Harness wrote: Show quoted text
> Greetings, > This message has been automatically generated in response to your bug report about Test-Harness, a summary of which appears below. > > There is no need to reply to this message right now. Your bug in Test-Harness has been assigned an ID of [cpan #7305]. Please include the string: > > [cpan #7305] > > in the subject line of all future correspondence about this issue. To do so, > you may reply to this message. > > Thank you, > bug-Test-Harness@rt.cpan.org > > ------------------------------------------------------------------------- > Given that the extended output mentions "got" and "expected", the documentation should be more instructive than "this" and "that" for parameters. > > P.S. I'd be glad to do the work. > >
-- Michael R. Wolf All mammals learn by playing! MichaelRWolf@att.net
I'll move it over.
From: MichaelRWolf [...] att.net
I'd be happy to do the work for this, and a few others. Let me know if I can help. Thanks, Michael Wolf
Attached patch updates documentation implement this wishlist item (it's on my wishlist too).
--- ./lib/Test/More.pm.orig 2006-11-03 11:31:59.000000000 -0800 +++ ./lib/Test/More.pm 2006-11-03 11:39:54.000000000 -0800 @@ -53,8 +53,8 @@ # Various ways to say "ok" ok($this eq $that, $test_name); - is ($this, $that, $test_name); - isnt($this, $that, $test_name); + is ($got, $exptected, $test_name); + isnt($got, $expected, $test_name); # Rather than print STDERR "# here's what went wrong\n" diag("here's what went wrong"); @@ -64,7 +64,7 @@ cmp_ok($this, '==', $that, $test_name); - is_deeply($complex_structure1, $complex_structure2, $test_name); + is_deeply($got_complex_structure, $expected_complex_structure, $test_name); SKIP: { skip $why, $how_many unless $have_some_feature; @@ -267,8 +267,8 @@ =item B<isnt> - is ( $this, $that, $test_name ); - isnt( $this, $that, $test_name ); + is ( $got, $expected, $test_name ); + isnt( $got, $expected, $test_name ); Similar to ok(), is() and isnt() compare their two arguments with C<eq> and C<ne> respectively and use the result of that to @@ -760,7 +760,7 @@ =item B<is_deeply> - is_deeply( $this, $that, $test_name ); + is_deeply( $got, $expected, $test_name ); Similar to is(), except that if $this and $that are references, it does a deep comparison walking each data structure to see if they are
The repository contains a version with the docs changed over to $got/$expected. If you could proof it and try to reword and bits of the surrounding docs that no longer work I'd appreciate it. http://svn.schwern.org/CPAN/Test-Simple/trunk
Subject: Re: [rt.cpan.org #2655] docs for "is" better as ($got,$expected) than ($this,$that)
Date: Sun, 05 Nov 2006 11:28:45 -0500
To: bug-Test-Simple [...] rt.cpan.org
From: Michael G Schwern <schwern [...] gmail.com>
Wil Cooley via RT wrote: Show quoted text
> Queue: Test-Simple > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=2655 > > > Attached patch updates documentation implement this wishlist item (it's > on my wishlist too).
This appears to be quite incomplete only covering part of the SYNOPSIS and a handful of functions. If this/that is going to be replaced with got/expected it should be done across the board. Show quoted text
> --- ./lib/Test/More.pm.orig 2006-11-03 11:31:59.000000000 -0800 > +++ ./lib/Test/More.pm 2006-11-03 11:39:54.000000000 -0800 > @@ -53,8 +53,8 @@ > # Various ways to say "ok" > ok($this eq $that, $test_name); > > - is ($this, $that, $test_name); > - isnt($this, $that, $test_name); > + is ($got, $exptected, $test_name); > + isnt($got, $expected, $test_name); > > # Rather than print STDERR "# here's what went wrong\n" > diag("here's what went wrong"); > @@ -64,7 +64,7 @@ > > cmp_ok($this, '==', $that, $test_name); > > - is_deeply($complex_structure1, $complex_structure2, $test_name); > + is_deeply($got_complex_structure, $expected_complex_structure, $test_name); > > SKIP: { > skip $why, $how_many unless $have_some_feature; > @@ -267,8 +267,8 @@ > > =item B<isnt> > > - is ( $this, $that, $test_name ); > - isnt( $this, $that, $test_name ); > + is ( $got, $expected, $test_name ); > + isnt( $got, $expected, $test_name ); > > Similar to ok(), is() and isnt() compare their two arguments > with C<eq> and C<ne> respectively and use the result of that to > @@ -760,7 +760,7 @@ > > =item B<is_deeply> > > - is_deeply( $this, $that, $test_name ); > + is_deeply( $got, $expected, $test_name ); > > Similar to is(), except that if $this and $that are references, it > does a deep comparison walking each data structure to see if they are
On Sun Nov 05 14:20:20 2006, schwern@pobox.com wrote: Show quoted text
> Wil Cooley via RT wrote:
> > Queue: Test-Simple > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=2655 > > > > > Attached patch updates documentation implement this wishlist item
> (it's
> > on my wishlist too).
> > This appears to be quite incomplete only covering part of the SYNOPSIS > and a handful of functions. If this/that is going to be replaced with > got/expected it should be done across the board.
I expressly left ok() and cmp() because the distinction is meaningless in those contexts; using '$got' and '$expected' there might mislead the user into thinking the distinction was meaningful. like() and unlink() I because I've never used them so I didn't know what to expect. But, whatever--I'm just glad you've done it--now my average of getting it right might break 50% :)
From: MSCHWERN [...] cpan.org
On Mon Nov 06 14:30:21 2006, WILCO wrote: Show quoted text
> > This appears to be quite incomplete only covering part of the SYNOPSIS > > and a handful of functions. If this/that is going to be replaced with > > got/expected it should be done across the board.
> > I expressly left ok() and cmp() because the distinction is meaningless > in those contexts; using '$got' and '$expected' there might mislead the > user into thinking the distinction was meaningful. like() and unlink() > I because I've never used them so I didn't know what to expect. > > But, whatever--I'm just glad you've done it--now my average of getting > it right might break 50% :)
I forgot to say thanks for giving it a shot. Thanks.
Subject: RE: [rt.cpan.org #2655] docs for "is" better as ($got,$expected) than ($this,$that)
Date: Thu, 9 Nov 2006 22:28:15 -0500
To: <bug-Test-Simple [...] rt.cpan.org>, <mark [...] summersault.com>
From: "Michael R. Wolf" <MichaelRWolf [...] att.net>
Michael, Sorry I didn't get to review it. Thanks for the fix. Mark, Thanks for the review. Michael -- Michael R. Wolf All mammals learn by playing! MichaelRWolf@att.net Show quoted text
> -----Original Message----- > From: Michael_G_Schwern via RT [mailto:bug-Test-Simple@rt.cpan.org] > Sent: Sunday, November 05, 2006 12:41 PM > To: MichaelRWolf@att.net; mark@summersault.com > Subject: [rt.cpan.org #2655] docs for "is" better as ($got,$expected) than > ($this,$that) > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=2655 > > > The repository contains a version with the docs changed over to > $got/$expected. If you could proof it and try to reword and bits of the > surrounding docs that no longer work I'd appreciate it. > > http://svn.schwern.org/CPAN/Test-Simple/trunk
Subject: RE: [rt.cpan.org #2655] Resolved: docs for "is" better as ($got,$expected) than ($this,$that)
Date: Fri, 10 Nov 2006 07:36:26 -0500
To: <bug-Test-Simple [...] rt.cpan.org>
From: "Michael R. Wolf" <MichaelRWolf [...] att.net>
Thanks!!!! I'm looking forward to it. -- Michael R. Wolf All mammals learn by playing! MichaelRWolf@att.net
Subject: RE: [rt.cpan.org #2655] Resolved: docs for "is" better as ($got,$expected) than ($this,$that)
Date: Fri, 10 Nov 2006 07:36:26 -0500
To: <bug-Test-Simple [...] rt.cpan.org>
From: "Michael R. Wolf" <MichaelRWolf [...] att.net>
Thanks!!!! I'm looking forward to it. -- Michael R. Wolf All mammals learn by playing! MichaelRWolf@att.net