mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-04 05:09:53 +01:00
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:
parent
35f510545d
commit
02c7e41c7c
@ -53,7 +53,7 @@ namespace Catch {
|
|||||||
|
|
||||||
virtual void testCaseStarting( TestCaseInfo const& testInfo ) CATCH_OVERRIDE {
|
virtual void testCaseStarting( TestCaseInfo const& testInfo ) CATCH_OVERRIDE {
|
||||||
StreamingReporterBase::testCaseStarting(testInfo);
|
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 )
|
if ( m_config->showDurations() == ShowDurations::Always )
|
||||||
m_testCaseTimer.start();
|
m_testCaseTimer.start();
|
||||||
|
Loading…
Reference in New Issue
Block a user