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

2005-07-29 Thread Peter

Michael G Schwern wrote:


* Added the long delayed BAIL_OUT to Test::More.



So, the way I would go about using this would be something like this?

my $obj=new SomeObj();
isa($obj, SomeObj) or BAIL_OUT(It wasn't my object :();

--Peter


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

2005-07-28 Thread Michael G Schwern
On Thu, Jul 28, 2005 at 05:48:58PM -0500, Peter wrote:
 So, the way I would go about using this would be something like this?
 
 my $obj=new SomeObj();
 isa($obj, SomeObj) or BAIL_OUT(It wasn't my object :();

isa_ok() but you get the idea.  You call it when you think the code is so
busted that its not worth continuing any testing, that means halting the
current test and not running any further test files.


-- 
Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern
Ahh email, my old friend.  Do you know that revenge is a dish that is best 
served cold?  And it is very cold on the Internet!


[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 delayed BAIL_OUT to Test::More.

* Changed the standard failure diagnostics to include the test name plus
  some additional minor formatting changes to better separate the description
  of which test failed from the diagnostics about how it failed.  Anyone
  relying on the formatting of the diagnostic output should take note.

Before (0.60)
1..2
not ok 1
# Failed test (/Users/schwern/tmp/test at line 5)
#  got: '23'
# expected: '43'
not ok 2 - this is the test description
# Failed test (/Users/schwern/tmp/test at line 6)
#  got: 'foo'
# expected: 'bar'
# Looks like you failed 2 tests of 2.

After (0.60_01)
1..2
not ok 1
#   Failed test in /Users/schwern/tmp/test at line 5.
#  got: '23'
# expected: '43'
not ok 2 - this is the test description
#   Failed test 'this is the test description'
#   in /Users/schwern/tmp/test at line 6.
#  got: 'foo'
# expected: 'bar'
# Looks like you failed 2 tests of 2.


The improvement becomes more evident when you look at it through 
Test::Harness

Before (0.60)
/Users/schwern/tmp/test...NOK 1  
# Failed test (/Users/schwern/tmp/test at line 5)
#  got: 'foo'
# expected: 'bar'
# Looks like you failed 1 test of 1.
/Users/schwern/tmp/test...dubious
Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 1
Failed 1/1 tests, 0.00% okay
Failed Test Stat Wstat Total Fail  Failed  List of Failed
---
/Users/schwern/tmp/test1   256 11 100.00%  1
Failed 1/1 test scripts, 0.00% okay. 1/1 subtests failed, 0.00% okay.


After (0.60_01)
/Users/schwern/tmp/test...NOK 1  
#   Failed test 'this is the test description'
#   in /Users/schwern/tmp/test at line 5.
#  got: 'foo'
# expected: 'bar'
# Looks like you failed 1 test of 1.
/Users/schwern/tmp/test...dubious
Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 1
Failed 1/1 tests, 0.00% okay
Failed Test Stat Wstat Total Fail  Failed  List of Failed
---
/Users/schwern/tmp/test1   256 11 100.00%  1
Failed 1/1 test scripts, 0.00% okay. 1/1 subtests failed, 0.00% okay.




0.60_01  Sun Jul  3 18:11:58 PDT 2005
- Moved the docs around a little to better group all the testing
  functions together. [rt.cpan.org 8388]
* Added a BAIL_OUT() function to Test::More [rt.cpan.org 8381]
- Changed Test::Builder-BAILOUT to BAIL_OUT to match other method's
  naming conventions.  BAILOUT remains but is deprecated.
* Changed the standard failure diagnostics to include the test name.
  [rt.cpan.org 12490]
- is_deeply() was broken for overloaded objects in the top level in
  0.59_01.  [rt.cpan.org 13506]
- String overloaded objects without an 'eq' or '==' method are now
  handled in cmp_ok() and is().
- cmp_ok() will now treat overloaded objects as numbers if the comparison
  operator is numeric. [rt.cpan.org 13156]
- cmp_ok(), like() and unlike will now throw uninit warnings if their
  arguments are undefined. [rt.cpan.org 13155]
- cmp_ok() will now throw warnings as if the comparison were run 
  normally, for example cmp_ok(2, '==', 'foo') will warn about 'foo' 
  not being numeric.  Previously all warnings in the comparison were
  supressed. [rt.cpan.org 13155]
- Tests will now report *both* the number of tests failed and if the
  wrong number of tests were run.  Previously if tests failed and the
  wrong number were run it would only report the latter. 
  [rt.cpan.org 13494]
- Missing or extra tests are not considered failures for the purposes
  of calculating the exit code.  Should there be no failures but the
  wrong number of tests the exit code will be 254.
- Avoiding an unbalanced sort in eq_set() [bugs.perl.org 36354]
- Documenting that eq_set() doesn't deal well with refs.
- Clarified how is_deeply() compares a bit.
* Once again working on 5.4.5.

0.60  Tue May  3 14:20:34 PDT 2005

0.59_01  Tue Apr 26 21:51:12 PDT 2005
* Test::Builder now has a create() method which allows you to create
  a brand spanking new Test::Builder object.
* require_ok() was not working for single letter module names.
* is_deeply() and eq_* now work with circular scalar references
  (Thanks Fergal)
* Use of eq_* now officially discouraged.
-