I'm just starting to use the unit test framework, and have
        encountered a small bug (I think) in the XML output.  I am
        just including:

#include <boost/test/auto_unit_test.hpp>
#include <boost/test/included/unit_test_framework.hpp>

        And have implemented my test cases using BOOST_AUTO_UNIT_TEST.

        Using the --report_format command line switch, The build info
        is output in plain text before the XML:

% ./serialize --report_level=detailed --report_format=XML --build_info=yes

Platform: Generic Unix
Compiler: Unknown ISO C++ Compiler
STL     : Unknown ISO standard library
Boost   : 1.30.0
Running 1 test case...
<TestResult>
<TestSuite name="Auto Unit Test" result="passed">
  <Asssertions passed="1" failed="0" expected_failures="0"/>
  <TestCase name="serialize_test" result="passed">
    <Asssertions passed="1" failed="0" expected_failures="0"/>
  </TestCase>
</TestSuite>
</TestResult>

        If I instead set BOOST_TEST_OUTPUT_FORMAT=XML as an
        environment variable, the build info is shown correctly in
        XML:

% BOOST_TEST_OUTPUT_FORMAT=XML ./serialize --build_info=yes --report_level=detailed

<TestLog platform="Generic Unix" compiler="Unknown ISO C++ Compiler" stl="Unknown ISO 
standard library" boost="1.30.0">
</TestLog>
<TestResult>
<TestSuite name="Auto Unit Test" result="passed">
  <Asssertions passed="1" failed="0" expected_failures="0"/>
  <TestCase name="serialize_test" result="passed">
    <Asssertions passed="1" failed="0" expected_failures="0"/>
  </TestCase>
</TestSuite>
</TestResult>
        

-- 
Caleb Epstein |  bklyn . org  |  "Our vision is to speed up time, eventually
    cae at    | Brooklyn Dust |  eliminating it."
bklyn dot org |   Bunny Mfg.  |                 -- Alex Schure
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to