26 lines
656 B
C
26 lines
656 B
C
|
|
#pragma once
|
||
|
|
|
||
|
|
#include <gtest/gtest.h>
|
||
|
|
|
||
|
|
#include <XCEngine/Debug/ConsoleLogSink.h>
|
||
|
|
#include <XCEngine/Debug/Logger.h>
|
||
|
|
|
||
|
|
#include <cstdio>
|
||
|
|
#include <cstdlib>
|
||
|
|
#include <memory>
|
||
|
|
|
||
|
|
inline int RunRenderingIntegrationTestMain(int argc, char** argv) {
|
||
|
|
using namespace XCEngine::Debug;
|
||
|
|
|
||
|
|
Logger::Get().Initialize();
|
||
|
|
Logger::Get().AddSink(std::make_unique<ConsoleLogSink>());
|
||
|
|
Logger::Get().SetMinimumLevel(LogLevel::Debug);
|
||
|
|
|
||
|
|
testing::InitGoogleTest(&argc, argv);
|
||
|
|
const int result = RUN_ALL_TESTS();
|
||
|
|
|
||
|
|
Logger::Get().Shutdown();
|
||
|
|
std::fflush(nullptr);
|
||
|
|
std::_Exit((result == 0 && !testing::UnitTest::GetInstance()->Failed()) ? 0 : 1);
|
||
|
|
}
|