Some checks failed
Conan Packaging / Package Bin2CPP/1.0.0 (push) Has been cancelled
Bin2CPP / Build & Test Debug with ./ConanProfiles/clangd (Unity Build: OFF) (push) Has been cancelled
Bin2CPP / Build & Test Debug with ./ConanProfiles/clangd (Unity Build: ON) (push) Has been cancelled
Bin2CPP / Build & Test Debug with ./ConanProfiles/clangd_asan (Unity Build: OFF) (push) Has been cancelled
Bin2CPP / Build & Test Debug with ./ConanProfiles/clangd_asan (Unity Build: ON) (push) Has been cancelled
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: OFF) (push) Has been cancelled
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: ON) (push) Has been cancelled
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clangd (Unity Build: OFF) (push) Has been cancelled
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clangd (Unity Build: ON) (push) Has been cancelled
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clangd_asan (Unity Build: OFF) (push) Has been cancelled
Bin2CPP / Build & Test Release with ./ConanProfiles/clangd (Unity Build: ON) (push) Has been cancelled
Bin2CPP / Build & Test Release with ./ConanProfiles/clangd_asan (Unity Build: OFF) (push) Has been cancelled
Bin2CPP / Build & Test Debug with ./ConanProfiles/clang (Unity Build: ON) (push) Has been cancelled
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clangd_asan (Unity Build: ON) (push) Has been cancelled
Bin2CPP / Build & Test Release with ./ConanProfiles/clang (Unity Build: OFF) (push) Has been cancelled
Bin2CPP / Build & Test Release with ./ConanProfiles/clang (Unity Build: ON) (push) Has been cancelled
Bin2CPP / Build & Test Release with ./ConanProfiles/clangd (Unity Build: OFF) (push) Has been cancelled
Bin2CPP / Build & Test Release with ./ConanProfiles/clangd_asan (Unity Build: ON) (push) Has been cancelled
Bin2CPP / Clang Format Checks (push) Has been cancelled
Bin2CPP / Build & Test Debug with ./ConanProfiles/clang (Unity Build: OFF) (push) Has been cancelled
Bin2CPP / Sonarqube (push) Has been cancelled
Reviewed-on: #2 Co-authored-by: Romain BOULLARD <romain.boullard@protonmail.com> Co-committed-by: Romain BOULLARD <romain.boullard@protonmail.com>
77 lines
1.8 KiB
C++
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
|