Code example for CharBuffer

Methods: clear

0
 
    @TestTargetNew( 
        level = TestLevel.PARTIAL_COMPLETE, 
        notes = "", 
        method = "subSequence", 
        args = {int.class, int.class} 
    ) 
    public void testSubSequence() { 
        try { 
            buf.subSequence(-1, buf.length());
            fail("Should throw Exception"); //$NON-NLS-1$ 
        } catch (IndexOutOfBoundsException e) {
            // expected 
        } 
        try { 
            buf.subSequence(buf.length() + 1, buf.length() + 1);
            fail("Should throw Exception"); //$NON-NLS-1$ 
        } catch (IndexOutOfBoundsException e) {
            // expected 
        } 
        assertEquals(buf.subSequence(buf.length(), buf.length()).length(), 0);