FormatIntTest: FormatDec: don't assume signedness of char type

Thanks to Eugene V. Lyubimkin for the patch.
This commit is contained in:
vitaut 2015-06-22 07:03:26 -07:00
parent 2e874af293
commit 8450f5e1d3

View File

@ -1532,7 +1532,7 @@ std::string format_decimal(T value) {
}
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)));
std::ostringstream os;
os << std::numeric_limits<unsigned short>::max();