@@ -402,6 +402,17 @@ void testIndexOfAny_StringCharArray() {
402402 assertEquals (0 , StringUtils .indexOfAny ("cbda" , 'a' , 'b' , 'c' , 'd' ));
403403 }
404404
405+ /**
406+ * See https://www.oracle.com/technical-resources/articles/javase/supplementary.html
407+ */
408+ @ Test
409+ void testIndexOfAny_StringCharArrayWithSupplementaryChars () {
410+ assertEquals (0 , StringUtils .indexOfAny (CharU20000 + CharU20001 , CharU20000 .toCharArray ()));
411+ assertEquals (2 , StringUtils .indexOfAny (CharU20000 + CharU20001 , CharU20001 .toCharArray ()));
412+ assertEquals (0 , StringUtils .indexOfAny (CharU20000 , CharU20000 .toCharArray ()));
413+ assertEquals (-1 , StringUtils .indexOfAny (CharU20000 , CharU20001 .toCharArray ()));
414+ }
415+
405416 @ Test
406417 void testIndexOfAny_StringIntCharArray () {
407418 // default cases
@@ -438,17 +449,6 @@ void testIndexOfAny_StringIntCharArray() {
438449 assertEquals (1 , StringUtils .indexOfAny ("cbda" , 1 , 'a' , 'b' , 'c' , 'd' ));
439450 }
440451
441- /**
442- * See https://www.oracle.com/technical-resources/articles/javase/supplementary.html
443- */
444- @ Test
445- void testIndexOfAny_StringCharArrayWithSupplementaryChars () {
446- assertEquals (0 , StringUtils .indexOfAny (CharU20000 + CharU20001 , CharU20000 .toCharArray ()));
447- assertEquals (2 , StringUtils .indexOfAny (CharU20000 + CharU20001 , CharU20001 .toCharArray ()));
448- assertEquals (0 , StringUtils .indexOfAny (CharU20000 , CharU20000 .toCharArray ()));
449- assertEquals (-1 , StringUtils .indexOfAny (CharU20000 , CharU20001 .toCharArray ()));
450- }
451-
452452 @ Test
453453 void testIndexOfAny_StringString () {
454454 assertEquals (-1 , StringUtils .indexOfAny (null , (String ) null ));
0 commit comments