Re: [Perlunit-devel] (no subject)
Status: Beta
Brought to you by:
mca1001
|
From: Piers C. <pdc...@bo...> - 2001-11-14 08:26:58
|
Adam Spiers <ad...@sp...> writes:
> Is lib/Test/Unit/tests/TestAssertionCodeRef.pm dead? It doesn't
> currently seem to be used. We also seem to be missing tests for
> Assertion::Regexp and Assertion::CodeRef; I'll add those to
> tests/AssertTest.pm along with new tests for the finished ok()
> wrapper.
I think I wrote it to help with the development and didn't get 'round
to adding it to AllTests.
BTW, I've been thinking about the naming and placing of test packages.
1. By placing the tests in the ./lib tree they get installed along
with the rest of the testsuite. I'm not sure that this is a good
thing.
2. I've taken to naming my test classes using the same 'lower case
with underscores' approach as that used for method names etc. This
may not be a desperately good naming strategy, but it does help to
distinguish tests from operational code.
3. On preface (the refactoring engine), I've taken to placing tests in
a tlib directory. This has the advantage of not having tests
installed and lets you use shorter names for your test libraries:
test::assertion_coderefs instead of
Test::Unit::tests::TestAssertionCodeRef
If we were to write a 'tlib.pm' modelled on blib.pm we could make
working with a test libs directory reasonably trivial for
developers.
Anyway, just a few thoughts.
--
Piers
"It is a truth universally acknowledged that a language in
possession of a rich syntax must be in need of a rewrite."
-- Jane Austen?
|