mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 11:43:29 +01:00
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:
parent
377c9a746d
commit
a64a0c6f06
@ -139,8 +139,7 @@ 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 );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user