Boost logo

Boost :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2005-02-26 04:46:02


"Pavel Vozenilek" <pavel_vozenilek_at_[hidden]> wrote in message
news:cvoj97$u7b$1_at_sea.gmane.org...
> In sandbox http://boost-sandbox.sourceforge.net/vault/
> is small (1 header minitest.hpp) Boostified library
> to help with testing.

Hi, Pavel

Don't take following wrong. I always open to alternative if there is a
target audience.

Boost.Test currently present 7 different components/configurations for
different testing needs. Each intendeded to cover specific users needs. What
you propose is hmm. strange mix of couple advanced features with lack of
numerouos basic ones.

> I use it instead of other frameworks as it
> doesn't require any work.

I am not quite sure what you mean: does it write your tests for you?

>
> Example of use:
> _________________________________
> #include <boost/minitest.hpp>
>
> BOOST_MINITEST
> {
> assert(....);
> }
>
> BOOST_MINITEST
> {
> assert(....);
> ....
> }
>
> ...
> boost::minitest::execute_all_tests();

This needs to be called form somewhere, doesn;t it?

> Features:
>
> - no helper classes, functions or naming conventions needed

Do you know single test framework that require specific naming convention?
None of Boost.Test components require any of above.

> - allows to execute tests randomly (I found this very helpful)

Unit Test framework does it either (since about week ago)

> - it is possible to execute tests only from last N modified source files.
> This allows to re-run tests after every minor source
> modification (i.e. Test Driven Development)

Do you know any framework that doesn't? You compile your test (only those
files that modifed will compile) and run it. Frankly I do not see much value
in what you are trying to implement here. I may misunderstood something
though.

> - no *.cpp files

It both advantage and dissadvantage. depends on the user. Amount of extra
headers you bring may easily overweight need for standalone library
compilation. In any case Boost.Test supply both choices already

> - works on systems w/o exceptions enabled, doesn't need RTTI

There were no requist for this kind of support yet, so I guess it's not that
important. Though it easy to modify minimal test facility to work under this
requirement.

> - works with DLLs (it is needed to "register" every DLL).
> DLLs can be dynamically loaded/unloaded.

Sorry, this needs to be clarified. I just don't know what you mean.

> - tested with VC6, Intel 7, BCB 6. Should work on UNIXes
> (I don't try yet).
>
> - allows to re-run failed test immediatelly if user wishes

Do you know single framework that doesn't?

> _________________________________
> Disadvantages:
>
> - tests must be written on top level (i.e. not within functions)
>
> - no mechanism to select what "exact" tests to run is available
> (by design - I found it rather useless for me)
>
> - testing a DLLs requires few lines of support code per DLL
>
> - the "test only few last changed files" feature is rather brittle - it
> doesn't
> deal with headers and dependencies (it is just quick an dirty tool)

TO the list of disadvantages you may add:

1. Total lack of any test tools
2. Essencially no exceptions support
3. No proper fatal erors support
4. One need to write main and initiate test
5. No errors log (or i did not find it)
6. No results report (ot I did not find it)

>
> Would this tiny tool be useful as part of Boost? - as complement
> to Boost.Test. If there's interest I can write docs and add tests.

Currently Boost.Test provide minimal test facility for simpliest testing
needs. Or one could use inlined version of Unit test framework that does all
that you do plus ...

> /Pavel

Regards,

Gennadiy


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