|
Boost Users : |
From: Dmitry Bufistov (dmitry_at_[hidden])
Date: 2006-03-06 09:39:00
> Mateusz Ã
�oskot wrote:
>
> >>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.
> >
> > 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?
>Hi Dmitry,
>But what about building Unit Test Framework library?
>How should I provide building it? Using bjam (bjam would be requirement)
>or own home-made makefiles for UTF?
>Cheers
It is for sure that I didn't build anything separate in boost (of cause
exept the "date_time" library ) and things more or less work for me.
I have just to projects in my solution - second is unit_test_framework
and I doesn't link with external boost libraries. You can try to compile
and execute the following code (without any external linking):
Good luck!
--dima
// BOOST_TEST_TEST.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <boost/test/included/unit_test_framework.hpp>
using namespace boost::unit_test;
void test1_suit1() {
BOOST_REQUIRE(false);
}
void test2_suit1() {
BOOST_REQUIRE(false);
}
void test1_suit2() {
BOOST_REQUIRE(false);
}
test_suite* init_unit_test_suite( int argc, char* argv[] )
{
test_suite* master_test_unit = BOOST_TEST_SUITE("Master");
test_suite* ts_1 = BOOST_TEST_SUITE( "test_suite1" );
ts_1->add( BOOST_TEST_CASE( &test1_suit1), 1 );
ts_1->add( BOOST_TEST_CASE( &test2_suit1), 1 );
test_suite* ts_2 = BOOST_TEST_SUITE( "test_suite2" );
ts_2->add( BOOST_TEST_CASE( &test1_suit2), 1 );
/**Add test suites here in order to run them**/
master_test_unit->add(ts_1);
master_test_unit->add(ts_2);
return master_test_unit;
}
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