mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-18 06:15:16 +00:00
Add test
This commit is contained in:
parent
43eb577a47
commit
b640e68d06
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user