This is an automated email from the ASF dual-hosted git repository.

kinow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git


The following commit(s) were added to refs/heads/master by this push:
     new b16b93fa5 Remove duplicate asserts in StringUtilsTest.
     new 1bad88dbc Merge branch 'pr-913'
b16b93fa5 is described below

commit b16b93fa5f318a7695f1d65dc7552dfcc3179227
Author: shalk <[email protected]>
AuthorDate: Sun Jun 19 22:53:05 2022 +0800

    Remove duplicate asserts in StringUtilsTest.
---
 src/test/java/org/apache/commons/lang3/StringUtilsTest.java | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/test/java/org/apache/commons/lang3/StringUtilsTest.java 
b/src/test/java/org/apache/commons/lang3/StringUtilsTest.java
index ad4bffb9b..29d1823e3 100644
--- a/src/test/java/org/apache/commons/lang3/StringUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/StringUtilsTest.java
@@ -305,7 +305,6 @@ public class StringUtilsTest {
         assertAbbreviateWithOffset("...ijklmno", 8, 10);
         assertAbbreviateWithOffset("...ijklmno", 9, 10);
         assertAbbreviateWithOffset("...ijklmno", 10, 10);
-        assertAbbreviateWithOffset("...ijklmno", 10, 10);
         assertAbbreviateWithOffset("...ijklmno", 11, 10);
         assertAbbreviateWithOffset("...ijklmno", 12, 10);
         assertAbbreviateWithOffset("...ijklmno", 13, 10);
@@ -1622,13 +1621,11 @@ public class StringUtilsTest {
     @Test
     public void testRemove_char() {
         // StringUtils.remove(null, *)       = null
-        assertNull(StringUtils.remove(null, 'a'));
-        assertNull(StringUtils.remove(null, 'a'));
+        assertNull(StringUtils.remove(null, null));
         assertNull(StringUtils.remove(null, 'a'));
 
         // StringUtils.remove("", *)          = ""
-        assertEquals("", StringUtils.remove("", 'a'));
-        assertEquals("", StringUtils.remove("", 'a'));
+        assertEquals("", StringUtils.remove("", null));
         assertEquals("", StringUtils.remove("", 'a'));
 
         // StringUtils.remove("queued", 'u') = "qeed"
@@ -2774,7 +2771,7 @@ public class StringUtilsTest {
         assertEquals("b", res[1]);
         assertEquals("c", res[2]);
         assertEquals("", res[3]);
-        assertEquals("", res[3]);
+        assertEquals("", res[4]);
 
         // Match example in javadoc
         {
@@ -3044,7 +3041,6 @@ public class StringUtilsTest {
                 () -> StringUtils.truncate(null, Integer.MIN_VALUE),
                 "maxWith cannot be negative");
         assertEquals("", StringUtils.truncate("", 10));
-        assertEquals("", StringUtils.truncate("", 10));
         assertEquals("abc", StringUtils.truncate("abcdefghij", 3));
         assertEquals("abcdef", StringUtils.truncate("abcdefghij", 6));
         assertEquals("", StringUtils.truncate("abcdefghij", 0));

Reply via email to