@@ -1323,6 +1323,7 @@ void testLeftPad_StringInt() {
13231323 assertEquals (" " , StringUtils .leftPad ("" , 5 ));
13241324 assertEquals (" abc" , StringUtils .leftPad ("abc" , 5 ));
13251325 assertEquals ("abc" , StringUtils .leftPad ("abc" , 2 ));
1326+ assertEquals ("abc" , StringUtils .leftPad ("abc" , Integer .MIN_VALUE ));
13261327 }
13271328
13281329 @ Test
@@ -1333,6 +1334,7 @@ void testLeftPad_StringIntChar() {
13331334 assertEquals ("xxabc" , StringUtils .leftPad ("abc" , 5 , 'x' ));
13341335 assertEquals ("\uffff \uffff abc" , StringUtils .leftPad ("abc" , 5 , '\uffff' ));
13351336 assertEquals ("abc" , StringUtils .leftPad ("abc" , 2 , ' ' ));
1337+ assertEquals ("abc" , StringUtils .leftPad ("abc" , Integer .MIN_VALUE , ' ' ));
13361338 final String str = StringUtils .leftPad ("aaa" , 10000 , 'a' ); // bigger than pad length
13371339 assertEquals (10000 , str .length ());
13381340 assertTrue (StringUtils .containsOnly (str , 'a' ));
@@ -1350,6 +1352,7 @@ void testLeftPad_StringIntString() {
13501352 assertEquals ("abc" , StringUtils .leftPad ("abc" , -1 , " " ));
13511353 assertEquals (" abc" , StringUtils .leftPad ("abc" , 5 , null ));
13521354 assertEquals (" abc" , StringUtils .leftPad ("abc" , 5 , "" ));
1355+ assertEquals ("abc" , StringUtils .leftPad ("abc" , Integer .MIN_VALUE , " " ));
13531356 }
13541357
13551358 @ Test
@@ -2202,6 +2205,7 @@ void testRightPad_StringInt() {
22022205 assertEquals ("abc " , StringUtils .rightPad ("abc" , 5 ));
22032206 assertEquals ("abc" , StringUtils .rightPad ("abc" , 2 ));
22042207 assertEquals ("abc" , StringUtils .rightPad ("abc" , -1 ));
2208+ assertEquals ("abc" , StringUtils .rightPad ("abc" , Integer .MIN_VALUE ));
22052209 }
22062210
22072211 @ Test
@@ -2212,6 +2216,7 @@ void testRightPad_StringIntChar() {
22122216 assertEquals ("abc" , StringUtils .rightPad ("abc" , 2 , ' ' ));
22132217 assertEquals ("abc" , StringUtils .rightPad ("abc" , -1 , ' ' ));
22142218 assertEquals ("abcxx" , StringUtils .rightPad ("abc" , 5 , 'x' ));
2219+ assertEquals ("abc" , StringUtils .rightPad ("abc" , Integer .MIN_VALUE , ' ' ));
22152220 final String str = StringUtils .rightPad ("aaa" , 10000 , 'a' ); // bigger than pad length
22162221 assertEquals (10000 , str .length ());
22172222 assertTrue (StringUtils .containsOnly (str , 'a' ));
@@ -2229,6 +2234,7 @@ void testRightPad_StringIntString() {
22292234 assertEquals ("abc" , StringUtils .rightPad ("abc" , -1 , " " ));
22302235 assertEquals ("abc " , StringUtils .rightPad ("abc" , 5 , null ));
22312236 assertEquals ("abc " , StringUtils .rightPad ("abc" , 5 , "" ));
2237+ assertEquals ("abc" , StringUtils .rightPad ("abc" , Integer .MIN_VALUE , " " ));
22322238 }
22332239
22342240 @ Test
0 commit comments