MCPcopy Create free account
hub / github.com/OpenCppCoverage/OpenCppCoverage / _tmain

Function _tmain

TestCoverageConsole/TestCoverageConsole.cpp:56–96  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

54
55//-----------------------------------------------------------------------------
56int _tmain(int argc, _TCHAR* argv[])
57{
58 if (argc < 2)
59 std::wcout << L"Invalid number of argument: " << argc << std::endl;
60 else
61 {
62 std::wstring type = argv[1];
63
64 if (type == TestCoverageConsole::TestBasic)
65 TestCoverageConsole::RunTestBasic();
66 else if (type == TestCoverageConsole::TestThread)
67 TestCoverageConsole::RunThread();
68 else if (type == TestCoverageConsole::TestSharedLib)
69 TestCoverageSharedLib::IsOdd(42);
70 else if (type == TestCoverageConsole::TestThrowHandledException)
71 ThrowHandledException();
72 else if (type == TestCoverageConsole::TestThrowUnHandledCppException)
73 throw 42;
74 else if (type == TestCoverageConsole::TestThrowUnHandledSEHException)
75 *reinterpret_cast<int*>(0) = 42;
76 else if (type == TestCoverageConsole::TestBreakPoint)
77 DebugBreak();
78 else if (type == TestCoverageConsole::TestChildProcess)
79 TestCoverageConsole::RunChildProcesses(argc, argv);
80 else if (type == TestCoverageConsole::TestFileInSeveralModules)
81 TestFileInSeveralModules();
82 else if (type == TestCoverageConsole::TestSpecialLineInfo)
83 TestCoverageConsole::SpecialLineInfo();
84 else if (false) // to have GetFileWithSpecialChars symbol in release.
85 TestCoverageConsole::GetFileWithSpecialChars();
86 else if (type == TestCoverageConsole::TestUnloadReloadDll)
87 TestCoverageConsole::UnloadReloadDll();
88 else if (type == TestCoverageConsole::TestDiff)
89 TestCoverageConsole::FilterByDiff();
90 else if (type == TestCoverageConsole::TestOptimizedBuild)
91 TestCoverageOptimizedBuild::TestOptimizedBuild();
92 else
93 std::wcerr << L"Unsupported type:" << type << std::endl;
94 }
95 return 0;
96}

Callers

nothing calls this directly

Calls 11

RunTestBasicFunction · 0.85
RunThreadFunction · 0.85
IsOddFunction · 0.85
ThrowHandledExceptionFunction · 0.85
RunChildProcessesFunction · 0.85
TestFileInSeveralModulesFunction · 0.85
SpecialLineInfoFunction · 0.85
GetFileWithSpecialCharsFunction · 0.85
UnloadReloadDllFunction · 0.85
FilterByDiffFunction · 0.85
TestOptimizedBuildFunction · 0.85

Tested by

no test coverage detected