int main(int ac, const char** av) { const char * av_override[] = {"exe", "-v"}; #ifdef CPPUTEST_INCLUDE_GTEST_TESTS GTestConvertor convertor; convertor.addAllGTestToTestRegistry(); #endif MemoryReporterPlugin plugin; MockSupportPlugin mockPlugin; TestRegistry::getCurrentRegistry()->installPlugin(&plugin); TestRegistry::getCurrentRegistry()->installPlugin(&mockPlugin); #ifndef GMOCK_RENAME_MAIN int rv = CommandLineTestRunner::RunAllTests(2, av_override); #else /* Don't have any memory leak detector when running the Google Test tests */ testing::GMOCK_FLAG(verbose) = testing::internal::kWarningVerbosity; ConsoleTestOutput output; CommandLineTestRunner runner(ac, av, &output, TestRegistry::getCurrentRegistry()); return runner.runAllTestsMain(); #endif //Exiting from main causes IAR simulator to issue out-of-bounds memory access warnings. volatile int wait = 1; while (wait){} return rv; }
int main(int ac, const char** av) { #ifdef CPPUTEST_USE_REAL_GTEST GTestConvertor convertor; convertor.addAllGTestToTestRegistry(); #endif MemoryReporterPlugin plugin; MockSupportPlugin mockPlugin; TestRegistry::getCurrentRegistry()->installPlugin(&plugin); TestRegistry::getCurrentRegistry()->installPlugin(&mockPlugin); return CommandLineTestRunner::RunAllTests(ac, av); }
int main(int ac, const char** av) { #ifdef INCLUDE_GTEST_TESTS GTestConvertor convertor; convertor.addAllGTestToTestRegistry(); #endif MemoryReporterPlugin plugin; MockSupportPlugin mockPlugin; TestRegistry::getCurrentRegistry()->installPlugin(&plugin); TestRegistry::getCurrentRegistry()->installPlugin(&mockPlugin); #ifndef GMOCK_RENAME_MAIN return CommandLineTestRunner::RunAllTests(ac, av); #else /* Don't have any memory leak detector when running the Google Test tests */ testing::GMOCK_FLAG(verbose) = testing::internal::kWarningVerbosity; ConsoleTestOutput output; CommandLineTestRunner runner(ac, av, &output, TestRegistry::getCurrentRegistry()); return runner.runAllTestsMain(); #endif }