Boost logo

Boost Users :

From: Chris Weed (chrisweed_at_[hidden])
Date: 2006-09-13 20:26:15


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


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