Boost logo

Boost Users :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2006-09-14 10:34:51


"Chris Weed" <chrisweed_at_[hidden]> wrote in message
news:359e4bf50609131726o35b7601al4dabf26c188edebf_at_mail.gmail.com...
>> Boost.Test based unit test has an ability to format an output in XML.
>> Use --output_format=XML
>> or
>> --report_format=XML
>> --log_format=XML
>>
>> separately.
>>
>> Gennadiy
>
> I tried the following test with bjam -d0, which outputs the xml to
> std::cout.
> However, it also outputs the following message:
> *** No errors detected
>
> How do I turn this message off?

you could use --report_level=no

> Chris
>
>
> // Test
>
> #include <boost/test/unit_test.hpp>
> #include <boost/test/unit_test_suite.hpp>
> #include <boost/test/unit_test_log.hpp>
> using boost::unit_test::test_suite;
>
> // Test U1
> static
> void test_U1()
> {
> BOOST_CHECK(1>0);
> }
>
> test_suite*
> init_unit_test_suite( int, char* [] )
> {
> boost::unit_test::unit_test_log.set_format(boost::unit_test::XML);

You did not setup report format.

>
> boost::unit_test::unit_test_log.set_threshold_level(boost::unit_test::log_successful_tests);
> test_suite* test = BOOST_TEST_SUITE( "My tests" );
> test->add( BOOST_TEST_CASE( &test_U1 ) );
> return test;
> }

Gennadiy


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