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

Function main

tests/CppUTestExt/AllTests.cpp:38–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36#endif
37
38int main(int ac, const char *const *av)
39{
40 int result = 0;
41 GlobalSimpleStringCache simpleStringCache;
42
43 {
44#ifdef CPPUTEST_INCLUDE_GTEST_TESTS
45 GTestConvertor convertor;
46 convertor.addAllGTestToTestRegistry();
47#endif
48
49 MemoryReporterPlugin plugin;
50 MockSupportPlugin mockPlugin;
51 TestRegistry::getCurrentRegistry()->installPlugin(&plugin);
52 TestRegistry::getCurrentRegistry()->installPlugin(&mockPlugin);
53
54#ifndef GMOCK_RENAME_MAIN
55 result = CommandLineTestRunner::RunAllTests(ac, av);
56#else
57 /* Don't have any memory leak detector when running the Google Test tests */
58
59 testing::GMOCK_FLAG(verbose) = testing::internal::kWarningVerbosity;
60
61 ConsoleTestOutput output;
62 CommandLineTestRunner runner(ac, av, TestRegistry::getCurrentRegistry());
63 result = runner.runAllTestsMain();
64#endif
65 }
66
67 return result;
68}
69

Callers

nothing calls this directly

Calls 3

runAllTestsMainMethod · 0.80
installPluginMethod · 0.45

Tested by

no test coverage detected