Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorPhil Nash2012-11-16 08:47:03 +0000
committerPhil Nash2012-11-16 08:47:03 +0000
commitef60d54671981f86b0c94bd597f8acf8382b4ba2 (patch)
tree98b37e6a0d1944a846ba77e38adddc236fafa9d3 /include
parentbe1cddb7ee0b2c76edc5380afe170ca302b2d8d9 (diff)
downloadcatch3-ef60d54671981f86b0c94bd597f8acf8382b4ba2.tar.gz
Fix (hopefully) for #5 (reopened)
Adds name to JUnit reporter's testsuite element, even when running all tests. Also removes redundant comment from the output.
Diffstat (limited to 'include')
-rw-r--r--include/internal/catch_version.hpp2
-rw-r--r--include/reporters/catch_reporter_junit.hpp9
2 files changed, 6 insertions, 5 deletions
diff --git a/include/internal/catch_version.hpp b/include/internal/catch_version.hpp
index e7573191..9c293e77 100644
--- a/include/internal/catch_version.hpp
+++ b/include/internal/catch_version.hpp
@@ -13,7 +13,7 @@
namespace Catch {
// These numbers are maintained by a script
- Version libraryVersion = { 0, 9, 1, "integration" };
+ Version libraryVersion = { 0, 9, 2, "integration" };
}
#endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED
diff --git a/include/reporters/catch_reporter_junit.hpp b/include/reporters/catch_reporter_junit.hpp
index 93c48360..d9b1a47a 100644
--- a/include/reporters/catch_reporter_junit.hpp
+++ b/include/reporters/catch_reporter_junit.hpp
@@ -79,8 +79,11 @@ namespace Catch {
virtual void StartTesting(){}
- virtual void StartGroup( const std::string& groupName ) {
- m_statsForSuites.push_back( Stats( groupName ) );
+ virtual void StartGroup( const std::string& groupName ) {
+ if( groupName.empty() )
+ m_statsForSuites.push_back( Stats( "all tests" ) );
+ else
+ m_statsForSuites.push_back( Stats( groupName ) );
m_currentStats = &m_statsForSuites.back();
}
@@ -188,8 +191,6 @@ namespace Catch {
std::vector<TestCaseStats>::const_iterator it = stats.m_testCaseStats.begin();
std::vector<TestCaseStats>::const_iterator itEnd = stats.m_testCaseStats.end();
for(; it != itEnd; ++it ) {
- xml.writeBlankLine();
- xml.writeComment( "Test case" );
XmlWriter::ScopedElement e = xml.scopedElement( "testcase" );
xml.writeAttribute( "classname", it->m_className );