This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-lang.git
commit 16b89f5482a2138def0c87cef985ab86db68b67a Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Tue Apr 15 09:51:01 2025 -0400 Add explicit simple tests --- src/test/java/org/apache/commons/lang3/StringUtilsTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/java/org/apache/commons/lang3/StringUtilsTest.java b/src/test/java/org/apache/commons/lang3/StringUtilsTest.java index f5163591f..9c5168680 100644 --- a/src/test/java/org/apache/commons/lang3/StringUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/StringUtilsTest.java @@ -2857,14 +2857,14 @@ public void testToCodePoints() { final int orphanedHighSurrogate = 0xD801; final int orphanedLowSurrogate = 0xDC00; final int supplementary = 0x2070E; - - final int[] codePoints = {'a', orphanedHighSurrogate, 'b', 'c', supplementary, - 'd', orphanedLowSurrogate, 'e'}; + final int[] codePoints = { 'a', orphanedHighSurrogate, 'b', 'c', supplementary, 'd', orphanedLowSurrogate, 'e' }; final String s = new String(codePoints, 0, codePoints.length); assertArrayEquals(codePoints, StringUtils.toCodePoints(s)); - assertNull(StringUtils.toCodePoints(null)); assertArrayEquals(ArrayUtils.EMPTY_INT_ARRAY, StringUtils.toCodePoints("")); + assertArrayEquals(new int[] { 'a' }, StringUtils.toCodePoints("a")); + assertArrayEquals(new int[] { 'a', 'b' }, StringUtils.toCodePoints("ab")); + assertArrayEquals(new int[] { 'a', 'b', 'c' }, StringUtils.toCodePoints("abc")); } /**