提交 399e7647 编写于 作者: A arvinzzz

fix: mktime testcase

Signed-off-by: Narvinzzz <zhaotianyu9@huawei.com>
Change-Id: I50e0252aa8611e9a269b836c552bfdf33ade8f44
上级 2a4282f9
......@@ -377,12 +377,12 @@ LITE_TEST_CASE(PosixTimeFuncTestSuite, testTimeMktime001, Function | MediumTest
INIT_TM(timeptr, 2020, 7, 9, 18, 10, 0, 7);
time_t timeRet = mktime(&timeptr);
LOG("\n 2020-7-9 18:10:00, mktime Ret = %lld", timeRet);
TEST_ASSERT_EQUAL_INT(1596996600, timeRet);
TEST_ASSERT_EQUAL_INT(1596967800, timeRet);
INIT_TM(timeptr, 1970, 0, 1, 8, 0, 0, 0);
timeRet = mktime(&timeptr);
LOG("\n 1970-1-1 08:00:00, mktime Ret = %lld", timeRet);
TEST_ASSERT_EQUAL_INT(28800, timeRet);
TEST_ASSERT_EQUAL_INT(0, timeRet);
struct tm *stm = localtime(&testTime);
LOG("\n testTime 18880, tm : %s", TmToStr(stm, timeStr, TIME_STR_LEN));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册