Boost logo

Boost Users :

From: Dmitry (dmitry_at_[hidden])
Date: 2006-03-06 08:21:46


Mateusz Łoskot wrote:

> Hi,
>
> I'm going to add Unit Tests to one of projects.
> It's quite big project, so there will be many tests suits and cases.
> The project build system is based on automake for Unix and nmake for
> Windows.
> I wonder what is the best practice to include Boost.Test
> frameworks to my own project?
>
> Currently I consider only Unit Test Framework.
>
> I see following possibilities:
>
> 1. Boost libraries are installed from official release
> (precompiled or compiled by user)
> Makefiles for my project try to detect if Boost exists and link to
> Unit Test Framework librar.
> Here Boost has to be listed in compilation requirements of my project.
>
> 2. Boost.Test libraries in binary form are included to my project tree
> and shipped together.
> So there is no requirement to have complete Boost installed, because
> test can link to UTF library already present
>
> 3. Include Boost.Test source code and allow user of my project to build
> UTF library on his own. Here I expect some problems with bjam/makefiles
> incompatibility. So, bjam would be required on user's platform.
> Simply, this solution seems to be quite confusing for user.
>
> I'd like to know your comments about which solution is best and what are
> possible traps hidding.
> Regarding the 1 solution I think there may be possible problem with
> using incorrect Boost.Test version.
> The second one involves additional work for overall projct maintenance.
>
> May be there are more possibilities I've not listed above, so please
> share your ideas.
>
> Thanks in advance for your comments.
> Best regards

Hello Mateusz,
One obsevation concerning 3th approach for using boost.test framework.
You just can include
#include <boost/test/included/unit_test_framework.hpp>
to your project and compile everything using your build system, isn't it?
--dima


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net