Fix core version of vformat_to

This commit is contained in:
Victor Zverovich
2018-10-25 06:21:41 -07:00
parent ea4010d704
commit 61e6d2e38c
4 changed files with 31 additions and 12 deletions
+10
View File
@@ -532,6 +532,16 @@ TEST(CoreTest, Format) {
EXPECT_EQ(fmt::format("{}", 42), "42");
}
TEST(CoreTest, FormatTo) {
// This should work without including fmt/format.h.
#ifdef FMT_FORMAT_H_
# error fmt/format.h must not be included in the core test
#endif
std::string s;
fmt::format_to(std::back_inserter(s), "{}", 42);
EXPECT_EQ(s, "42");
}
TEST(CoreTest, ToStringViewForeignStrings) {
using namespace my_ns;
using namespace FakeQt;