Consistent junit reporting regardless of internal SECTIONS

Change it so the classname attribute on the <testcase> element is the
test fixture name or "global" regardless of whether the TEST_CASE
contains SECTIONs. This way the output is not changed substantially,
just because a SECTION is added to a TEST_CASE.
This commit is contained in:
Thomas Sondergaard 2017-05-30 17:10:14 +02:00
parent 377c9a746d
commit a64a0c6f06

View File

@ -139,7 +139,6 @@ namespace Catch {
std::string className = stats.testInfo.className; std::string className = stats.testInfo.className;
if( className.empty() ) { if( className.empty() ) {
if( rootSection.childSections.empty() )
className = "global"; className = "global";
} }
writeSection( className, "", rootSection ); writeSection( className, "", rootSection );