XML Reporter closes tag and flushes stream at end of TestCase and Section tags.

This fixes an issue where XML reports on stdout are broken by printf statements
This commit is contained in:
Phil Nash committed 2017-02-13 15:56:25 +00:00
1 parent bc68b9f454
commit 873ef276b6
7 files changed
+23 -12

No files matched your search

+7 -7
View File
@@ -211,6 +211,13 @@ namespace Catch {
return *this;
}
void ensureTagClosed() {
if( m_tagIsOpen ) {
m_os << ">" << std::endl;
m_tagIsOpen = false;
}
}
private:
XmlWriter( XmlWriter const& );
void operator=( XmlWriter const& );
@@ -219,13 +226,6 @@ namespace Catch {
m_os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
}
void ensureTagClosed() {
if( m_tagIsOpen ) {
m_os << ">" << std::endl;
m_tagIsOpen = false;
}
}
void newlineIfNecessary() {
if( m_needsNewline ) {
m_os << std::endl;