I'm running google test.
I need something like Before class. I have the SetUp()
and TearDown()
functions, but they run before and after each test. Now I need something global - like ctor
, that should run only one time when the class loaded.
You can define static member functions void SetUpTestCase()
and void TearDownTestCase()
in each of your fixture classes, i.e. in each class derived from ::testing::Test
.
That code will run only once for each fixture, before and after all test in the fixture are run.
Check the docs.