@@ -2334,76 +2334,40 @@ void testSplit_StringString_StringStringInt() {
23342334 void testSplitByCharacterType () {
23352335 assertNull (StringUtils .splitByCharacterType (null ));
23362336 assertEquals (0 , StringUtils .splitByCharacterType ("" ).length );
2337-
2338- assertTrue (Objects .deepEquals (new String []{"ab" , " " , "de" , " " ,
2339- "fg" }, StringUtils .splitByCharacterType ("ab de fg" )));
2340-
2341- assertTrue (Objects .deepEquals (new String []{"ab" , " " , "de" , " " ,
2342- "fg" }, StringUtils .splitByCharacterType ("ab de fg" )));
2343-
2344- assertTrue (Objects .deepEquals (new String []{"ab" , ":" , "cd" , ":" ,
2345- "ef" }, StringUtils .splitByCharacterType ("ab:cd:ef" )));
2346-
2347- assertTrue (Objects .deepEquals (new String []{"number" , "5" },
2348- StringUtils .splitByCharacterType ("number5" )));
2349-
2350- assertTrue (Objects .deepEquals (new String []{"foo" , "B" , "ar" },
2351- StringUtils .splitByCharacterType ("fooBar" )));
2352-
2353- assertTrue (Objects .deepEquals (new String []{"foo" , "200" , "B" , "ar" },
2354- StringUtils .splitByCharacterType ("foo200Bar" )));
2355-
2356- assertTrue (Objects .deepEquals (new String []{"ASFR" , "ules" },
2357- StringUtils .splitByCharacterType ("ASFRules" )));
2358-
2337+ assertArrayEquals (new String [] { "ab" , " " , "de" , " " , "fg" }, StringUtils .splitByCharacterType ("ab de fg" ));
2338+ assertArrayEquals (new String [] { "ab" , " " , "de" , " " , "fg" }, StringUtils .splitByCharacterType ("ab de fg" ));
2339+ assertArrayEquals (new String [] { "ab" , ":" , "cd" , ":" , "ef" }, StringUtils .splitByCharacterType ("ab:cd:ef" ));
2340+ assertArrayEquals (new String [] { "number" , "5" }, StringUtils .splitByCharacterType ("number5" ));
2341+ assertArrayEquals (new String [] { "foo" , "B" , "ar" }, StringUtils .splitByCharacterType ("fooBar" ));
2342+ assertArrayEquals (new String [] { "foo" , "200" , "B" , "ar" }, StringUtils .splitByCharacterType ("foo200Bar" ));
2343+ assertArrayEquals (new String [] { "ASFR" , "ules" }, StringUtils .splitByCharacterType ("ASFRules" ));
23592344 // Supplementary code points are classified by their own type, not split apart as surrogates.
23602345 // U+1D400 MATHEMATICAL BOLD CAPITAL A is an upper-case letter, like ASCII 'A'.
23612346 final String boldA = new String (Character .toChars (0x1D400 ));
23622347 // U+1D7D3 MATHEMATICAL BOLD DIGIT FIVE is a decimal digit, like ASCII '5'.
23632348 final String boldFive = new String (Character .toChars (0x1D7D3 ));
2364- assertTrue (Objects .deepEquals (new String []{"A" + boldA },
2365- StringUtils .splitByCharacterType ("A" + boldA )));
2366- assertTrue (Objects .deepEquals (new String []{"5" + boldFive },
2367- StringUtils .splitByCharacterType ("5" + boldFive )));
2368- assertTrue (Objects .deepEquals (new String []{boldA , "5" + boldFive , "z" },
2369- StringUtils .splitByCharacterType (boldA + "5" + boldFive + "z" )));
2349+ assertArrayEquals (new String [] { "A" + boldA }, StringUtils .splitByCharacterType ("A" + boldA ));
2350+ assertArrayEquals (new String [] { "5" + boldFive }, StringUtils .splitByCharacterType ("5" + boldFive ));
2351+ assertArrayEquals (new String [] { boldA , "5" + boldFive , "z" }, StringUtils .splitByCharacterType (boldA + "5" + boldFive + "z" ));
23702352 }
23712353
23722354 @ Test
23732355 void testSplitByCharacterTypeCamelCase () {
23742356 assertNull (StringUtils .splitByCharacterTypeCamelCase (null ));
23752357 assertEquals (0 , StringUtils .splitByCharacterTypeCamelCase ("" ).length );
2376-
2377- assertTrue (Objects .deepEquals (new String []{"ab" , " " , "de" , " " ,
2378- "fg" }, StringUtils .splitByCharacterTypeCamelCase ("ab de fg" )));
2379-
2380- assertTrue (Objects .deepEquals (new String []{"ab" , " " , "de" , " " ,
2381- "fg" }, StringUtils .splitByCharacterTypeCamelCase ("ab de fg" )));
2382-
2383- assertTrue (Objects .deepEquals (new String []{"ab" , ":" , "cd" , ":" ,
2384- "ef" }, StringUtils .splitByCharacterTypeCamelCase ("ab:cd:ef" )));
2385-
2386- assertTrue (Objects .deepEquals (new String []{"number" , "5" },
2387- StringUtils .splitByCharacterTypeCamelCase ("number5" )));
2388-
2389- assertTrue (Objects .deepEquals (new String []{"foo" , "Bar" },
2390- StringUtils .splitByCharacterTypeCamelCase ("fooBar" )));
2391-
2392- assertTrue (Objects .deepEquals (new String []{"foo" , "200" , "Bar" },
2393- StringUtils .splitByCharacterTypeCamelCase ("foo200Bar" )));
2394-
2395- assertTrue (Objects .deepEquals (new String []{"ASF" , "Rules" },
2396- StringUtils .splitByCharacterTypeCamelCase ("ASFRules" )));
2397-
2358+ assertArrayEquals (new String [] { "ab" , " " , "de" , " " , "fg" }, StringUtils .splitByCharacterTypeCamelCase ("ab de fg" ));
2359+ assertArrayEquals (new String [] { "ab" , " " , "de" , " " , "fg" }, StringUtils .splitByCharacterTypeCamelCase ("ab de fg" ));
2360+ assertArrayEquals (new String [] { "ab" , ":" , "cd" , ":" , "ef" }, StringUtils .splitByCharacterTypeCamelCase ("ab:cd:ef" ));
2361+ assertArrayEquals (new String [] { "number" , "5" }, StringUtils .splitByCharacterTypeCamelCase ("number5" ));
2362+ assertArrayEquals (new String [] { "foo" , "Bar" }, StringUtils .splitByCharacterTypeCamelCase ("fooBar" ));
2363+ assertArrayEquals (new String [] { "foo" , "200" , "Bar" }, StringUtils .splitByCharacterTypeCamelCase ("foo200Bar" ));
2364+ assertArrayEquals (new String [] { "ASF" , "Rules" }, StringUtils .splitByCharacterTypeCamelCase ("ASFRules" ));
23982365 // A supplementary upper-case letter immediately before a lower-case run joins the following token,
23992366 // exactly as a BMP upper-case letter does. U+1D400 MATHEMATICAL BOLD CAPITAL A is an upper-case letter.
24002367 final String boldA = new String (Character .toChars (0x1D400 ));
2401- assertTrue (Objects .deepEquals (new String []{boldA + "bc" },
2402- StringUtils .splitByCharacterTypeCamelCase (boldA + "bc" )));
2403- assertTrue (Objects .deepEquals (new String []{"AB" , boldA + "cd" },
2404- StringUtils .splitByCharacterTypeCamelCase ("AB" + boldA + "cd" )));
2405- assertTrue (Objects .deepEquals (new String []{"foo" , boldA + "bar" },
2406- StringUtils .splitByCharacterTypeCamelCase ("foo" + boldA + "bar" )));
2368+ assertArrayEquals (new String [] { boldA + "bc" }, StringUtils .splitByCharacterTypeCamelCase (boldA + "bc" ));
2369+ assertArrayEquals (new String [] { "AB" , boldA + "cd" }, StringUtils .splitByCharacterTypeCamelCase ("AB" + boldA + "cd" ));
2370+ assertArrayEquals (new String [] { "foo" , boldA + "bar" }, StringUtils .splitByCharacterTypeCamelCase ("foo" + boldA + "bar" ));
24072371 }
24082372
24092373 @ Test
0 commit comments