2023-01-20 13:39:00 +08:00
|
|
|
#define _CRT_SECURE_NO_WARNINGS
|
2021-01-28 23:15:34 +08:00
|
|
|
#include "InternalTimegm.h"
|
2021-09-26 23:46:27 +08:00
|
|
|
|
2021-07-04 20:57:11 +08:00
|
|
|
#include <catch2/catch.hpp>
|
2021-01-28 23:15:34 +08:00
|
|
|
|
|
|
|
|
using namespace CesiumAsync;
|
|
|
|
|
|
|
|
|
|
TEST_CASE("Test custom timegm() method") {
|
2021-03-09 08:37:45 +08:00
|
|
|
SECTION("test current time") {
|
|
|
|
|
std::time_t currentTime = std::time(nullptr);
|
|
|
|
|
std::tm* gmt = std::gmtime(¤tTime);
|
|
|
|
|
REQUIRE(internalTimegm(gmt) == currentTime);
|
|
|
|
|
}
|
2021-01-28 23:15:34 +08:00
|
|
|
}
|