MCPcopy Create free account
hub / github.com/cpputest/cpputest / addAllGTestToTestRegistry

Method addAllGTestToTestRegistry

include/CppUTestExt/GTestConvertor.h:366–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

364}
365
366inline void GTestConvertor::addAllGTestToTestRegistry()
367{
368 createDummyInSequenceToAndFailureReporterAvoidMemoryLeakInGMock();
369 flags_.storeValuesOfGTestFLags();
370
371 int argc = 2;
372 const char * argv[] = {"NameOfTheProgram", "--gmock_catch_leaked_mocks=0"};
373 ::testing::InitGoogleMock(&argc, (char**) argv);
374
375 ::testing::UnitTest* unitTests = ::testing::UnitTest::GetInstance();
376
377 int currentUnitTestCount = 0;
378 ::testing::TestCase* currentTestCase = (::testing::TestCase*) unitTests->GetTestCase(currentUnitTestCount);
379 while (currentTestCase) {
380 addAllTestsFromTestCaseToTestRegistry(currentTestCase);
381 currentUnitTestCount++;
382 currentTestCase = (::testing::TestCase*) unitTests->GetTestCase(currentUnitTestCount);
383 }
384}
385
386
387#endif

Callers 3

TESTFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls 1

Tested by

no test coverage detected