stuff-from-scratch/test/test_runner.cpp
2023-12-18 10:16:31 +00:00

28 lines
614 B
C++

#include "TestFramework.h"
#include "CommandLineArgs.h"
#include "ConsoleLogger.h"
#ifdef _WIN32
#include <windows.h>
#endif
//int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow)
int main(int argc, char *argv[])
{
#ifdef _WIN32
CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
#endif
CommandLineArgs args;
args.process(argc, argv);
ConsoleLogger::logLine("Starting test run.");
TestCaseRunner::getInstance().run(args.getUserArgs());
ConsoleLogger::logLine("Finished test run.");
#ifdef _WIN32
CoUninitialize();
#endif
return 0;
}