unit test framework XML output - CDATA sections?

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

Maróy Ákos
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... ]]>
Make sense. I'll look into fixing this. Gennadiy.

Gennadiy Rozental wrote:
Maróy Ákos
writes: 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... ]]>
Make sense. I'll look into fixing this.
This is done. Gennadiy
participants (2)
-
Gennadiy Rozental
-
Maróy Ákos