
"Peter Dimov" <pdimov@mmltd.net> writes:
Being the conservative I am,
...and that I value...
I'd like to keep the current way operational without altering the behavior of the tests that are written correctly and do work.
Of course; I intended that.
The automatic reporting outlined above always leads to abnormal termination when there are errors; I don't like this. The alternative that just terminates when report_errors hasn't been called seems workable.
Sorry, I must've left out a little. I had assumed that report_errors() reset the error count to zero, so when the singleton got destroyed it would only abort if there were unreported errors.
One consequence of the minimal interface of lightweight_test.hpp is that main(), including its 'return' statement, is completely under the control of the user.
Yeah, I know. That's a liability when it comes to the mistake I'm describing.
It would probably be possible to make it slightly less lightweight and error prone by defining a BOOST_TEST_CASE macro and requiring a main() of the form
int main() { return boost::run_test_cases(); }
Yes, but that would not help catch errors in existing uses of the facility.
Well, the current way has worked for me so far. :-)
You, maybe, but several others made mistakes. -- Dave Abrahams Boost Consulting www.boost-consulting.com