Skip to content

Nested sections remove INFO output #2959

@learn-more

Description

@learn-more

Describe the bug
When using nested sections, the 'INFO' output is retired too early.

Expected behavior
The 'INFO' output stays in place for all relevant scopes.

Reproduction steps
In this example, the 'Info message!' is expected in both failure cases (4 == 1 and 2 == 1)

TEST_CASE( "NestedSection", "[broken]" ) {
    INFO( "Info message!" );
    SECTION( "outer" ) {
        SECTION( "inner" )
        {
            CHECK( 4 == 1 );    // The info shows fine here
        }
        CHECK( 2 == 1 ); // The info does not show up for this failing check
    }
}

Image

Platform information:

  • OS: Windows 10 22H2
  • Compiler+version: **MSVC 2022 **
  • Catch version: v3.8.0

I debugged it a bit
this does not take into account that you can have nested sections at all

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions