catchorg / catchorg/Catch2

junit report sections mixed

Open
#2,252 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
21.5k
Forks
3.5k
Avg merge
3d 16h
Merged PRs (30d)
2

Description

**Description**
I have a test structure like this with several stacked sections:
```cpp
TEST_CASE( "Testing works", "[TEST]" ) {
SECTION("A") {
SECTION("B1") {
SECTION("C1") {
REQUIRE(1==1);
}
SECTION("C2") {
FAIL("fail");
}
}
SECTION("B2")
{
FAIL("fail");
}
}
}
```
then `$ test -r junit` gives:
```xml





FAILED:
fail
at .../test.test.cc:15




FAILED:
fail
at .../test.test.cc:20




```
The name of the first test case now contains both sections C1 and C2.

**Expected behavior**
I'd expect the ordering to be TEST_CASE/A/B/C/... and with out mixing.

**Platform information:**

- OS: **Gentoo**
- Compiler+version: **GCC v8.4.0**
- Catch version: **v2.13.6**

**Additional context**
The command `-r xml` orders the sections correctly.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.