mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 12:17:11 +01:00 
			
		
		
		
	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.
This commit is contained in:
		| @@ -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 ); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Phil Nash
					Phil Nash