Skip to content

Commit

Permalink
Move internal::uintptr_t test to format-impl-test (#1152)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed May 11, 2019
1 parent 77d6036 commit ea2976e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
9 changes: 9 additions & 0 deletions test/format-impl-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
9 changes: 0 additions & 9 deletions test/format-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit ea2976e

Please sign in to comment.