mirror of
https://github.com/deepseek-ai/3FS
synced 2025-06-26 18:16:45 +00:00
Initial commit
This commit is contained in:
14
tests/common/utils/TestFmt.cc
Normal file
14
tests/common/utils/TestFmt.cc
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <fmt/chrono.h>
|
||||
#include <fmt/format.h>
|
||||
#include <fmt/ranges.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
namespace hf3fs::tests {
|
||||
namespace {
|
||||
TEST(Fmt, testFormat) {
|
||||
ASSERT_EQ(fmt::format("Hello {}", "world"), "Hello world");
|
||||
ASSERT_EQ(fmt::format("{}", std::vector<std::string>{"\naan"}), "[\"\\naan\"]");
|
||||
ASSERT_EQ(fmt::format("{:%S}", std::chrono::milliseconds(1234)), "01.234");
|
||||
}
|
||||
} // namespace
|
||||
} // namespace hf3fs::tests
|
||||
Reference in New Issue
Block a user