-----------------------------------------------------------------------------
| 54 | |
| 55 | //----------------------------------------------------------------------------- |
| 56 | int _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 | } |
nothing calls this directly
no test coverage detected