Move internal::uintptr_t test to format-impl-test (#1152)

This commit is contained in:
Victor Zverovich 2019-05-11 06:58:22 -07:00
parent 77d6036cd5
commit ea2976e6d5
2 changed files with 9 additions and 9 deletions

View File

@ -253,3 +253,12 @@ TEST(UtilTest, CountDigits) {
test_count_digits<uint32_t>();
test_count_digits<uint64_t>();
}
TEST(UtilTest, WriteUIntPtr) {
fmt::memory_buffer buf;
fmt::writer writer(buf);
writer.write_pointer(fmt::internal::bit_cast<fmt::internal::uintptr_t>(
reinterpret_cast<void*>(0xface)),
FMT_NULL);
EXPECT_EQ("0xface", to_string(buf));
}

View File

@ -685,15 +685,6 @@ TEST(WriterTest, WriteWideString) {
// std::declval<fmt::basic_writer<fmt::wbuffer>>().write("abc");
}
TEST(WriterTest, WriteUIntPtr) {
memory_buffer buf;
fmt::writer writer(buf);
writer.write_pointer(fmt::internal::bit_cast<fmt::internal::uintptr_t>(
reinterpret_cast<void*>(0xface)),
FMT_NULL);
EXPECT_EQ("0xface", to_string(buf));
}
TEST(FormatToTest, FormatWithoutArgs) {
std::string s;
fmt::format_to(std::back_inserter(s), "test");