fix: os ut issue

This commit is contained in:
dapan1121 2024-10-10 17:44:29 +08:00
parent d55a0032b1
commit 7e4da7604e
1 changed files with 11 additions and 9 deletions

View File

@ -34,6 +34,7 @@ TEST(osTimeTests, taosLocalTimeNolock) {
// Test when result is not NULL
struct tm expectedTime;
struct tm* result = taosLocalTimeNolock(&expectedTime, &currentTime, 1);
if (result) {
EXPECT_EQ(expectedTime.tm_year, result->tm_year);
EXPECT_EQ(expectedTime.tm_mon, result->tm_mon);
EXPECT_EQ(expectedTime.tm_mday, result->tm_mday);
@ -43,6 +44,7 @@ TEST(osTimeTests, taosLocalTimeNolock) {
EXPECT_EQ(expectedTime.tm_wday, result->tm_wday);
EXPECT_EQ(expectedTime.tm_yday, result->tm_yday);
EXPECT_EQ(expectedTime.tm_isdst, result->tm_isdst);
}
}