diff --git a/format-test.cc b/format-test.cc index 32c00351..947cd69a 100644 --- a/format-test.cc +++ b/format-test.cc @@ -1022,6 +1022,10 @@ void CheckUnknownTypes( } } +TEST(FormatterTest, FormatBool) { + EXPECT_EQ(L"1", str(Format(L"{}") << true)); +} + TEST(FormatterTest, FormatShort) { short s = 42; EXPECT_EQ("42", str(Format("{0:d}") << s)); diff --git a/format.h b/format.h index 4e505089..03661d2e 100644 --- a/format.h +++ b/format.h @@ -760,7 +760,7 @@ class BasicWriter { return *this; } - void Write(const std::basic_string &s, const FormatSpec &spec) { + void Write(const std::basic_string &s, const FormatSpec &spec) { FormatString(s.data(), s.size(), spec); }