Files
Bigfoot/Bigfoot/Tests/System/Time/Time.cpp
2026-02-08 18:04:18 +01:00

68 lines
1.7 KiB
C++

/*********************************************************************
* \file Time.cpp
*
* \author Romain BOULLARD
* \date December 2025
*********************************************************************/
#include <System/Time/Time.hpp>
#include <gtest/gtest.h>
namespace Bigfoot
{
class TimeFixture: public ::testing::Test
{
public:
Time m_time {1'767'643'746'680'609};
};
/****************************************************************************************/
TEST_F(TimeFixture, Year_ShouldReturnTheYear)
{
EXPECT_EQ(m_time.Year(), 2026);
}
/****************************************************************************************/
TEST_F(TimeFixture, Month_ShouldReturnTheMonth)
{
EXPECT_EQ(m_time.Month(), 1);
}
/****************************************************************************************/
TEST_F(TimeFixture, Day_ShouldReturnTheDay)
{
EXPECT_EQ(m_time.Day(), 5);
}
/****************************************************************************************/
TEST_F(TimeFixture, Hour_ShouldReturnTheHour)
{
EXPECT_EQ(m_time.Hour(), 20);
}
/****************************************************************************************/
TEST_F(TimeFixture, Minute_ShouldReturnTheMinute)
{
EXPECT_EQ(m_time.Minute(), 9);
}
/****************************************************************************************/
TEST_F(TimeFixture, Second_ShouldReturnTheSecond)
{
EXPECT_EQ(m_time.Second(), 6);
}
/****************************************************************************************/
TEST_F(TimeFixture, Microsecond_ShouldReturnTheMicrosecond)
{
EXPECT_EQ(m_time.Microsecond(), 680'609);
}
} // namespace Bigfoot