mirror of
https://github.com/deepseek-ai/3FS
synced 2025-06-26 18:16:45 +00:00
Initial commit
This commit is contained in:
17
tests/common/utils/TestUtc.cc
Normal file
17
tests/common/utils/TestUtc.cc
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "common/utils/UtcTime.h"
|
||||
|
||||
namespace hf3fs::tests {
|
||||
namespace {
|
||||
|
||||
TEST(UtcTime, testConvert) {
|
||||
UtcTime now = UtcClock::now();
|
||||
int64_t us = now.toMicroseconds();
|
||||
UtcTime utc = UtcTime::fromMicroseconds(us);
|
||||
|
||||
ASSERT_EQ(us, utc.toMicroseconds());
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace hf3fs::tests
|
||||
Reference in New Issue
Block a user