mirror of
https://github.com/fmtlib/fmt.git
synced 2026-04-29 02:03:36 +02:00
Refactor pointer formatting
This commit is contained in:
@@ -450,11 +450,11 @@ TEST(UtilTest, CountDigits) {
|
||||
test_count_digits<uint64_t>();
|
||||
}
|
||||
|
||||
TEST(UtilTest, WriteUIntPtr) {
|
||||
fmt::memory_buffer buf;
|
||||
fmt::internal::writer writer(buf);
|
||||
writer.write_pointer(
|
||||
TEST(UtilTest, WriteFallbackUIntPtr) {
|
||||
std::string s;
|
||||
fmt::internal::write_ptr<char>(
|
||||
std::back_inserter(s),
|
||||
fmt::internal::fallback_uintptr(reinterpret_cast<void*>(0xface)),
|
||||
nullptr);
|
||||
EXPECT_EQ("0xface", to_string(buf));
|
||||
EXPECT_EQ(s, "0xface");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user