Files
Bin2CPP/Bin2CPP/Tests/Bin2CPPLib/Log.cpp
2026-03-29 09:16:57 +00:00

77 lines
1.8 KiB
C++

/*********************************************************************
* \file Log.cpp
*
* \author Romain BOULLARD
* \date February 2026
*********************************************************************/
#include <Log.hpp>
#include <gtest/gtest.h>
#include <Assert.hpp>
namespace Bin2CPP
{
class LogFixture: public ::testing::Test
{
protected:
Log m_log;
};
/****************************************************************************************/
TEST_F(LogFixture, GetLogger_ShouldReturnTheLogger)
{
EXPECT_TRUE(m_log.GetLogger());
}
/****************************************************************************************/
TEST_F(LogFixture, LogDebug)
{
Singleton<Log>::Lifetime singletonLifetime;
BIN2CPP_LOG_DEBUG("Hello");
}
/****************************************************************************************/
TEST_F(LogFixture, LogTrace)
{
Singleton<Log>::Lifetime singletonLifetime;
BIN2CPP_LOG_TRACE("Hello");
}
/****************************************************************************************/
TEST_F(LogFixture, LogInfo)
{
Singleton<Log>::Lifetime singletonLifetime;
BIN2CPP_LOG_INFO("Hello");
}
/****************************************************************************************/
TEST_F(LogFixture, LogWarn)
{
Singleton<Log>::Lifetime singletonLifetime;
BIN2CPP_LOG_WARN("Hello");
}
/****************************************************************************************/
TEST_F(LogFixture, LogError)
{
Singleton<Log>::Lifetime singletonLifetime;
BIN2CPP_LOG_ERROR("Hello");
}
/****************************************************************************************/
TEST_F(LogFixture, LogFatal)
{
Singleton<Log>::Lifetime singletonLifetime;
BIN2CPP_LOG_FATAL("Hello");
}
} // namespace Bin2CPP