// Copyright Epic Games, Inc. All Rights Reserved. #include "zencore/testing.h" #include "zencore/logging.h" #if ZEN_WITH_TESTS namespace zen::testing { using namespace std::literals; struct TestRunner::Impl { doctest::Context Session; }; TestRunner::TestRunner() { m_Impl = std::make_unique(); } TestRunner::~TestRunner() { } int TestRunner::ApplyCommandLine(int argc, char const* const* argv) { m_Impl->Session.applyCommandLine(argc, argv); for (int i = 1; i < argc; ++i) { if (argv[i] == "--debug"sv) { zen::logging::SetLogLevel(zen::logging::level::Debug); } else if (argv[i] == "--verbose"sv) { zen::logging::SetLogLevel(zen::logging::level::Trace); } } return 0; } int TestRunner::Run() { return m_Impl->Session.run(); } } // namespace zen::testing #endif // ZEN_WITH_TESTS