Format (un)signed char as integer by default (#217)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user