Re: [Boost-users] How to organize my Unit Tests

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; }

Dmitry Bufistov wrote:
Yes, today I tested this solution. Works well. Thanks -- Mateusz Łoskot http://mateusz.loskot.net
participants (2)
-
Dmitry Bufistov
-
Mateusz Łoskot