Refactor pointer formatting

This commit is contained in:
Victor Zverovich
2020-05-03 20:33:25 -07:00
parent 9cc7edfddc
commit bab3f58003
2 changed files with 21 additions and 16 deletions
+5 -5
View File
@@ -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");
}