On 24 Feb 2007, at 22:58, Michael G Schwern wrote:
Just make sure whatever you return evaluates according to the test
pass/fail
and not its value and you should be fine. You can return a little
wrapper
object like...
Or you could just return a reference to an array with the value in
Mark Fowler wrote:
On 24 Feb 2007, at 22:58, Michael G Schwern wrote:
Just make sure whatever you return evaluates according to the test
pass/fail
and not its value and you should be fine. You can return a little
wrapper
object like...
Or you could just return a reference to an array
* Michael G Schwern [EMAIL PROTECTED] [2007-02-25 00:00]:
You can return a little wrapper
object like...
# handwaveI didn't actually try this/handwave
package Test::Result;
Or use Scalar::Util::dualvar (Perl uses the string value to check
truth so the numeric value may be
On 2/26/07, Michael G Schwern [EMAIL PROTECTED] wrote:
Also you don't want it to always be true. You want it to reflect whether
the test passed or failed. I presume you still want the extra value even if
the test failed.
Well, at first I didn't think that I'd want it, but after seeing your
Hello Perl QA Wizards,
I apologize in advance if this is documented somewhere, because I must
have missed it.
Is it OK to have the return value from a test be something more than
just true when a test passes? Thus the test might be used as a right
value in the test script.
Background:
I am
On Saturday 24 February 2007 06:47, Eric Hacker wrote:
Is it OK to have the return value from a test be something more than
just true when a test passes? Thus the test might be used as a right
value in the test script.
Seems like, in general, the semi-predicate problem. What if the value
chromatic wrote:
On Saturday 24 February 2007 06:47, Eric Hacker wrote:
Is it OK to have the return value from a test be something more than
just true when a test passes? Thus the test might be used as a right
value in the test script.
Seems like, in general, the semi-predicate problem.