Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested sections don't always execute #83

Closed
cschreib opened this issue Apr 12, 2023 · 0 comments · Fixed by #81
Closed

Nested sections don't always execute #83

cschreib opened this issue Apr 12, 2023 · 0 comments · Fixed by #81
Assignees
Labels
bug:confirmed Something isn't working (confirmed)
Milestone

Comments

@cschreib
Copy link
Member

cschreib commented Apr 12, 2023

TEST_CASE("sections") {
    SECTION("section 1") {
        SECTION("section 1.1") {
            SECTION("section 1.1.1") {
                FAIL_CHECK("trigger");
            }
            SECTION("section 1.1.2") {
                FAIL_CHECK("trigger");
            }
            SECTION("section 1.1.3") {
                FAIL_CHECK("trigger");
            }
        }
        SECTION("section 1.2") {
            SECTION("section 1.2.1") {
                FAIL_CHECK("trigger");
            }
            SECTION("section 1.2.2") {
                FAIL_CHECK("trigger");
            }
            SECTION("section 1.2.3") {
                FAIL_CHECK("trigger");
            }
        }
    }
    SECTION("section 2") {
        SECTION("section 2.1") {
            SECTION("section 2.1.1") {
                FAIL_CHECK("trigger");
            }
            SECTION("section 2.1.2") {
                FAIL_CHECK("trigger");
            }
            SECTION("section 2.1.3") {
                FAIL_CHECK("trigger");
            }
        }
    }
}

snitch v1.0.0 silently misses:

  • "section 1.2.2"
  • "section 1.2.3"
  • "section 2.1.2"
  • "section 2.1.3"

Essentially, the last section at any level is only ever entered once, even if it has multiple child sections.

@cschreib cschreib added the bug:unconfirmed Something isn't working (to be confirmed) label Apr 12, 2023
@cschreib cschreib added this to the v1.1 milestone Apr 12, 2023
@cschreib cschreib self-assigned this Apr 12, 2023
@cschreib cschreib added bug:confirmed Something isn't working (confirmed) and removed bug:unconfirmed Something isn't working (to be confirmed) labels May 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:confirmed Something isn't working (confirmed)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant