IXWebSocket/test/test_runner.cpp

30 lines
580 B
C++
Raw Normal View History

2018-12-30 03:33:15 +01:00
/*
* test_runner.cpp
* Author: Benjamin Sergeant
* Copyright (c) 2018 Machine Zone. All rights reserved.
*/
#define CATCH_CONFIG_RUNNER
#include "catch.hpp"
#include <spdlog/spdlog.h>
#include <ixwebsocket/IXNetSystem.h>
#include <ixcore/utils/IXCoreLogger.h>
int main(int argc, char* argv[])
2018-12-30 03:33:15 +01:00
{
ix::initNetSystem();
ix::IXCoreLogger::LogFunc logFunc = [](const char* msg)
{
spdlog::info(msg);
};
ix::IXCoreLogger::setLogFunction(logFunc);
2018-12-30 03:33:15 +01:00
int result = Catch::Session().run(argc, argv);
ix::uninitNetSystem();
2018-12-30 03:33:15 +01:00
return result;
}