Format (un)signed char as integer by default (#217)

This commit is contained in:
vitaut
2015-11-05 20:46:22 -05:00
parent 9beb01d8e5
commit 7c24973637
3 changed files with 14 additions and 7 deletions
+5
View File
@@ -1324,6 +1324,11 @@ TEST(FormatterTest, FormatChar) {
EXPECT_EQ(fmt::format("{:02X}", n), fmt::format("{:02X}", 'x'));
}
TEST(FormatterTest, FormatUnsignedChar) {
EXPECT_EQ("42", format("{}", static_cast<unsigned char>(42)));
EXPECT_EQ("42", format("{}", static_cast<uint8_t>(42)));
}
TEST(FormatterTest, FormatWChar) {
EXPECT_EQ(L"a", format(L"{0}", L'a'));
// This shouldn't compile: