catchorg / catchorg/Catch2

All assertion macros are not executed

Open
#933 6 comments 0 reactions 0 assignees View on GitHub
Resolved - pending review
Dominant language
C++
Stars
21.5k
Forks
3.5k
Avg merge
3d 16h
Merged PRs (30d)
2

Description

I have a single test case, and it can process multiple input files.

File1:
{
"configuration":{}
"assertions":[
{}, {}
]
}

Similarly, we have file 2 as well.

When I test with only one file at a time, it runs 36 assertions for each. When I run both files together, it only run 36 assertions.

All tests passed (36 assertions in 1 test case).

The problem has begun to appear, when I have started using multiple SECTIONS inside the same test case. When I have no or only one SECTION, all assertions were executed for all test cases. With multiple sections in place, this is for some reason not the case.

The test is something like this,

TEST_CASE("name", "[tags]") {
CHECK();

for(each input case) {

SECTION("name1") {
CHECK();
}
SECTION("name2") {
CHECK();
}
}//for end
}

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.