Test-More / TB2

Test::Builder version 2, the next generation of building testing modules in Perl
Other
1 stars 0 forks source link

Restore $builder->name #187

Closed schwernbot closed 10 years ago

schwernbot commented 10 years ago

From: @schwern Date: Thursday Nov 17, 2011 at 07:36 GMT Orig: https://github.com/Test-More/test-more/issues/220

Implementing subtests forced the removal of some now irrelevant bits of the public Test::Builder API which exposed internal details of how subtests were done. finalize, child, parent, and name are gone.

parent, finalize and child cannot be restored as the concept of a child copy of Test::Builder for subtests no longer exists. finalize might be faked... but if you're using methods that closely related to the old version of subtests it's better things just break loudly and quickly rather than quietly and subtly.

$builder->name can be restored. It simply returns the name of the current subtest. Outside of a subtest, use $0. Subtests now always have names, so there's no need to implement the "Child of $parent->name" default.

schwernbot commented 10 years ago

From: @wolfsage Date: Sunday Apr 01, 2012 at 12:44 GMT Orig: https://github.com/Test-More/test-more/issues/220#issuecomment-4866092

https://github.com/schwern/test-more/pull/279

schwernbot commented 10 years ago

From: @schwern Date: Wednesday Apr 11, 2012 at 23:54 GMT Orig: https://github.com/Test-More/test-more/issues/220#issuecomment-5081846

Thank you @wolfsage!