Boost logo

Boost Testing :

From: Voronkov Konstantin (beowinkle_at_[hidden])
Date: 2005-08-10 03:35:41


Hello, All!

I'm trying to use Boost.Test 1_32_0 Test Cases Automatic
  Registration facility. I redirected output to xml file
and set log_level=success", but as result I have not-well
formed XML file.

Is it problem in Boost.Test or I did something
  incorrect? How to fix the problem?

******* The test source (main.cpp)
#define BOOST_AUTO_TEST_MAIN

#include "boost/test/auto_unit_test.hpp"
#include "boost/test/included/unit_test_framework.hpp"
#include "boost/test/unit_test_log.hpp"

BOOST_AUTO_UNIT_TEST(TestEqual)
{
   BOOST_MESSAGE("message in TestEqual");
   const long l = 3;
   BOOST_CHECK_EQUAL(l, 3L);
}

******* I'm invoking test with command prompt in this way
call C:\Echo\MicrosoftVisualStudio\7.1\Vc7\bin\vcvars32.bat

cl /MD /EHsc /I S:\results\ThirdParty\build\stlport /I ..\boost_1_32_0
main.cpp S:\results\ThirdParty\build\stlport\stlport_vc71.lib

main.exe --output_format=XML --log_level=success > report.xml 2>&1

******* this is result output (report.xml)
<TestLog>
<TestSuite name="Auto Unit Test">
   <TestCase name="TestEqual">
     <Message file="main.cpp" line="9">
       message in TestEqual
     </Message>
     <Info file="main.cpp" line="11">
       l == 3L passed.
     </Info>
   </TestCase="TestEqual"> HERE IS PROBLEM 1
</TestSuite="Auto Unit Test"> HERE IS PROBLEM 2
</TestLog>
<TestResult>
<TestSuite name="Auto Unit Test" result="passed">
</TestSuite>
</TestResult>

As one can see the </TestCase="TestEqual"> is not correct
  XML syntax, this is why mine Test Suite can not be displayed
in standard browser.

Best Regards,
Voronkov Konstantin


Boost-testing list run by mbergal at meta-comm.com