Don't use CountDigits for 1-2 digit numbers.
This commit is contained in:
1 parent
7abd6443ac
commit
86574285cc
2 files changed
+13
-1
No files matched your search
@@ -1459,6 +1459,8 @@ TEST(FormatIntTest, FormatDec) {
|
||||
std::ostringstream os;
|
||||
os << std::numeric_limits<unsigned short>::max();
|
||||
EXPECT_EQ(os.str(), FormatDec(std::numeric_limits<unsigned short>::max()));
|
||||
EXPECT_EQ("1", FormatDec(1));
|
||||
EXPECT_EQ("-1", FormatDec(-1));
|
||||
EXPECT_EQ("42", FormatDec(42));
|
||||
EXPECT_EQ("-42", FormatDec(-42));
|
||||
EXPECT_EQ("42", FormatDec(42l));
|
||||
|
||||
Reference in new issue
Block a user