mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-30 05:40:06 +00:00
FormatIntTest: FormatDec: don't assume signedness of char type
Thanks to Eugene V. Lyubimkin for the patch.
This commit is contained in:
parent
2e874af293
commit
8450f5e1d3
@ -1532,7 +1532,7 @@ std::string format_decimal(T value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST(FormatIntTest, FormatDec) {
|
TEST(FormatIntTest, FormatDec) {
|
||||||
EXPECT_EQ("-42", format_decimal(static_cast<char>(-42)));
|
EXPECT_EQ("-42", format_decimal(static_cast<signed char>(-42)));
|
||||||
EXPECT_EQ("-42", format_decimal(static_cast<short>(-42)));
|
EXPECT_EQ("-42", format_decimal(static_cast<short>(-42)));
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
os << std::numeric_limits<unsigned short>::max();
|
os << std::numeric_limits<unsigned short>::max();
|
||||||
|
Loading…
Reference in New Issue
Block a user