Fix handling of volatile char (#1115)
This commit is contained in:
1 parent
bade46aae5
commit
5d755d0a4e
2 files changed
+11
-5
No files matched your search
@@ -1550,6 +1550,11 @@ TEST(FormatterTest, FormatChar) {
|
||||
EXPECT_EQ(fmt::format("{:02X}", n), fmt::format("{:02X}", 'x'));
|
||||
}
|
||||
|
||||
TEST(FormatterTest, FormatVolatileChar) {
|
||||
volatile char c = 'x';
|
||||
EXPECT_EQ("x", format("{}", c));
|
||||
}
|
||||
|
||||
TEST(FormatterTest, FormatUnsignedChar) {
|
||||
EXPECT_EQ("42", format("{}", static_cast<unsigned char>(42)));
|
||||
EXPECT_EQ("42", format("{}", static_cast<uint8_t>(42)));
|
||||
|
||||
Reference in new issue
Block a user