-----BEGIN PGP SIGNED MESSAGE-----
Moin,
On 11-Apr-02 Francois Gouget carved into stone:
On Thu, 11 Apr 2002, Paul Millar wrote: [...]
-ok( ($atom >= 0xc000) && ($atom <= 0xffff) && !defined($wine::err) ); +named_ok( "Adding atom "$name" via GlobalAddAtomA()", ($atom >= 0xc000) && ($atom <= 0xffff) && !defined($wine::err) );
Here's the rationale: when a test result is displayed (currently only on failure or success in a todo block) the file name and line number are included. If the test file is altered then any tests after the edit will have different line numbers. This makes these tests look like new ones: an undesirable behaviour but not too big an issue. Explicitly naming tests is a way of making the test results line-number independent.
Ok, so the goal is to make it possible to automatically analyze the test results. I see you point then.
[...]
meaning) and they may appear at an arbitrary point. A test name always appears in the same line as the test result, producing lines like:
tests/atom.pl:Checking GlobalAddAtom[AW](i) i < 0xc0000: Test succeeded
IMHO, this is a lot cleaner than using trace messages, although there's still the potential redundancy between a test's name and its error message.
Yes, seems cleaner than test messages but there is the problem of redundancy between the 'name' and the error message. Also, it seems that for your purposes all tests should use named_ok otherwise you will not be able to identify all tests. This means modifying all tests, and/or just having ok. No?
Just a quick hint:
The perl core test frame work already has dealed (probably) with problems like this. Check out the Test, Test::More and Test::Harness modules. Maybe you can re-use the work done there?
Thanx in advance,
Tels
- -- "Why do you go so slowly? Do you think this is some kind of game?" PGP key available on http://bloodgate.com/tels.asc or via email. perl -MDev::Bollocks -e'print Dev::Bollocks->rand(),"\n"' dynamically utilize value-added technologies