This commit is contained in:
Tatsunori Uchino 2026-02-01 10:57:43 +00:00
parent 43eb577a47
commit b640e68d06

View File

@ -313,6 +313,18 @@ public class CharBufferAsCharSequenceTest {
assertFalse(codePoints.hasNext(), "codePoints has more elements than expected " + description);
}
@ParameterizedTest(name="{4}")
@MethodSource("charBufferArguments")
void testCodePointCount(CharSequence actual, char[] expected, int start, int stop, String description) {
int expectedCount = 0;
OfInt it = actual.codePoints().iterator();
while (it.hasNext()) {
it.nextInt();
expectedCount++;
}
assertEquals(expectedCount, actual.codePointCount(), "codePointCount for " + description);
}
@ParameterizedTest(name="{4}")
@MethodSource("charBufferArguments")
void testSubSequence(CharSequence actual, char[] expected, int start, int stop, String description) {