未验证 提交 ddf3dc82 编写于 作者: O openharmony_ci 提交者: Gitee

!985 fix: mktime测试用例配套修改

Merge pull request !985 from Zhaotianyu/20230103fix_mktime_test
......@@ -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.
先完成此消息的编辑!
想要评论请 注册