Fix handling of wide strings in StringWriter

This commit is contained in:
Victor Zverovich
2016-07-18 08:47:11 -07:00
parent c110c6eca7
commit 65cd664195
2 changed files with 12 additions and 4 deletions
+8
View File
@@ -67,6 +67,14 @@ TEST(StringWriterTest, MoveTo) {
EXPECT_EQ(0, out.size());
}
TEST(StringWriterTest, WString) {
fmt::WStringWriter out;
out << "The answer is " << 42 << "\n";
std::wstring s;
out.move_to(s);
EXPECT_EQ(L"The answer is 42\n", s);
}
TEST(StringTest, ToString) {
EXPECT_EQ("42", fmt::to_string(42));
}