Boost logo

Boost :

From: Mike Attili (yahoomail_at_[hidden])
Date: 2001-10-22 15:15:20


Gennadiy,
Thanks for the improvements to the unit test framework. I've
been using the code in the 'unit_test_development' branch for
several current projects and I've been anxiously awaiting your
changes before I jump in (to avoid duplicate effort).

I haven't had a chance to look over the code in detail, but
I have a few observations:
1) There are two memory leaks in the framework. The first, carried
   over from the previous code, is that the ostrstream in wrapstrstream
   (unit_test_tools.hpp) isn't freed. I just put in a
   {buf.freeze(false);} in the destructor but there maybe a better way
   since I don't use strstream too often.
   The second is that unit_test_result::Impl::m_head (unit_test_result.cpp)
   is never deleted. Changing it to a scoped_ptr<unit_test_result>
   does the job.
2) std::distance() in parametrized_function_test_case and
   paramertized_class_test_case uses the 3 argument overload that (I guess)
   is a hold-over from the original STL. MSVC doesn't supply the 3 arg
version.
   Changing it to 'stages_amount() = std::distance( begin, end );' works
   fine.
3) I get an assertion running unit_test_tools_test on the following line:
     boost::output_test_stream output;
   It calls std::fstream with a NULL pattern file name. Not sure what it
should
   be doing in this case.

I'm running MSVC 6 sp5. There are a few features that I've added locally
that I'd like to integrate with this version of the unit test framework. In
particular: auto-registration of test cases and suites, and regex selection
of tests from the command line. My objective is to be able to use the Boost
unit test framework for 'test first design' like JUnit does for Java.

    Mike Attili
    Amaxo, Inc.

From: Gennadiy E. Rozental [mailto:rogeeff_at_[hidden]]
Subject: [boost] unit test framework
> This is initial version for unit test framework. Library is based
> on initial work by Beman Dawes and Ullrich Koethe. I still working on
> documentation and more tests. Al tests and examples should pass
> without errors. I provided for now MSVC workspace and projects you
> can use to build everything and check how it works.
>
> I was able to test it with MSVC and Sun Forte C++ u.2
>
> Your suggestions about enhancements and new features greatly
> appreciated.
>
> Gennadiy.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk