#include "libpldmresponder/bios.hpp"
#include "libpldmresponder/bios_table.hpp"

#include <libpldm/base.h>
#include <libpldm/bios.h>

#include <array>
#include <cstring>
#include <ctime>
#include <filesystem>

#include <gtest/gtest.h>

using namespace pldm;
using namespace pldm::responder;
using namespace pldm::responder::bios;
using namespace pldm::responder::utils;

TEST(epochToBCDTime, testTime)
{
    struct tm time{};
    time.tm_year = 119;
    time.tm_mon = 3;
    time.tm_mday = 13;
    time.tm_hour = 5;
    time.tm_min = 18;
    time.tm_sec = 13;
    time.tm_isdst = -1;

    time_t epochTime = mktime(&time);
    uint8_t seconds = 0;
    uint8_t minutes = 0;
    uint8_t hours = 0;
    uint8_t day = 0;
    uint8_t month = 0;
    uint16_t year = 0;

    epochToBCDTime(epochTime, seconds, minutes, hours, day, month, year);

    ASSERT_EQ(0x13, seconds);
    ASSERT_EQ(0x18, minutes);
    ASSERT_EQ(0x5, hours);
    ASSERT_EQ(0x13, day);
    ASSERT_EQ(0x4, month);
    ASSERT_EQ(0x2019, year);
}

TEST(timeToEpoch, testTime0)
{
    std::time_t ret = 1555132693;

    uint8_t sec = 13;
    uint8_t min = 18;
    uint8_t hours = 5;
    uint8_t day = 13;
    uint8_t month = 4;
    uint16_t year = 2019;

    std::time_t timeSec = 0;
    timeSec = timeToEpoch(sec, min, hours, day, month, year);

    EXPECT_EQ(ret, timeSec);
}
