Boost logo

Boost Users :

Subject: [Boost-users] unit test framework XML output - CDATA sections?
From: Maróy Ákos (akos_at_[hidden])
Date: 2009-11-08 09:55:48


Hi,

I have a suggestion for the XML output generated by the boost unit test
framework: currently, if tests fail, the message detailing the failure
of the test is put in verbatim as a test element into the XML output.
This can be problematic, if the output contains XML-like structures,
like text that looks like an XML element, or invalid characters.

thus, I'd suggest enclosing such output in a CDATA section, that would
ensure that the generated XML file is indeed always well formed XML. see
more here: http://www.w3.org/TR/REC-xml/#sec-cdata-sect - but basically
this would mean printing the failures like this:

<![CDATA[ reason of the failure... ]]>

Akos


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