Do not run test suite if SetUpTestSuite fails
- Dominant language
- C++
- Stars
- 39.5k
- Forks
- 10.9k
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 1
Description
In the latest 1.11.0 release failed SetUpTestSuite is not ignored anymore, but tests from the suite are still run after it fails.
It is common for tests to rely on something done in SetUpTestSuite, so running tests after it fails causes them to fail anyway or to finish program with segmentation fault. For example:
```
static void SetUpTestSuite() {
...
ASSERT_EQ(SUCCESS_MACRO, someInitFunc()); //fails
m_ptr = malloc(size);
...
}
TEST_F(SomeTestSuite, AfterFailedSetup) {
...
m_ptr[N] = ...; //causes segmentation fault
...
}
```
It would be nice to have an opportunity to mark whole test suite as failed if SetUpTestSuite fails and do not run tests from this suite.
Contributor guide
Assessment
This issue has not been assessed yet.