forked from catchorg/Catch2
Do not trim test case names in the XML reporter.
SCENARIO does not add leading spaces to the test name (only BDD-style section names are modified), so the trimming is not necessary. But if the name is trimmed, it makes it harder to correlate the output of XML reporter with tests that have leading spaces in their name: e.g. these tests will have the same name attribute: TEST_CASE("Test") {} TEST_CASE(" Test") {}
This commit is contained in:
@ -53,7 +53,7 @@ namespace Catch {
|
||||
|
||||
virtual void testCaseStarting( TestCaseInfo const& testInfo ) CATCH_OVERRIDE {
|
||||
StreamingReporterBase::testCaseStarting(testInfo);
|
||||
m_xml.startElement( "TestCase" ).writeAttribute( "name", trim( testInfo.name ) );
|
||||
m_xml.startElement( "TestCase" ).writeAttribute( "name", testInfo.name );
|
||||
|
||||
if ( m_config->showDurations() == ShowDurations::Always )
|
||||
m_testCaseTimer.start();
|
||||
|
Reference in New Issue
Block a user