If a GTest fixture defines SetUpTestSuite or TearDownTestSuite, these are not guaranteed to be called. This will happen for instance if the RapidCheck property is executed before any other GTest test cases in the fixture.
Minimal repro:
class FixtureWithSetUpTestSuite : public ::testing::Test {
protected:
FixtureWithSetUpTestSuite() {}
static int static_member;
static void SetUpTestSuite() { static_member = 1; }
};
int FixtureWithSetUpTestSuite::static_member{};
RC_GTEST_FIXTURE_PROP(FixtureWithSetUpTestSuite, TestSuiteSetup, ()) {
RC_ASSERT(static_member == 1);
}
This happens because the property is not registered as a test case within the given GTest fixture, but rather RapidCheck generates a separate fixture for it.