2021-03-01 21:07:32 +00:00
|
|
|
#define CATCH_CONFIG_RUNNER
|
2020-02-17 13:24:57 +00:00
|
|
|
#include <catch2/catch.hpp>
|
2021-03-01 21:07:32 +00:00
|
|
|
|
|
|
|
#include <util/logging/logger.hpp>
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
#include <winsock2.h>
|
|
|
|
int
|
|
|
|
startWinsock()
|
|
|
|
{
|
|
|
|
WSADATA wsockd;
|
|
|
|
int err;
|
|
|
|
err = ::WSAStartup(MAKEWORD(2, 2), &wsockd);
|
|
|
|
if (err)
|
|
|
|
{
|
|
|
|
perror("Failed to start Windows Sockets");
|
|
|
|
return err;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
int
|
|
|
|
main(int argc, char* argv[])
|
|
|
|
{
|
2021-03-03 13:33:20 +00:00
|
|
|
llarp::LogSilencer shutup{};
|
2021-03-01 21:07:32 +00:00
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
if (startWinsock())
|
|
|
|
return -1;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
int result = Catch::Session().run(argc, argv);
|
|
|
|
#ifdef _WIN32
|
|
|
|
WSACleanup();
|
|
|
|
#endif
|
|
|
|
return result;
|
|
|
|
}
|