Index: CharacterTest.java =================================================================== --- CharacterTest.java (revision 427077) +++ CharacterTest.java (working copy) @@ -25,6 +25,37 @@ assertEquals("Constructor failed", 'T', new Character('T').charValue()); } + public void test_codePointAt_Invalid() { + + try { + Character.codePointAt(null, 6, 4); + fail("Expected IndexOutOfBoundsException"); + } catch (IndexOutOfBoundsException e) { + // expected + } catch (Exception e) { + fail("Expected IndexOutOfBoundsException"); + } + + try { + Character.codePointAt(null, 4, 6); + fail("Expected NullPointerException"); + } catch (NullPointerException e) { + // expected + } catch (Exception e) { + fail("Expected NullPointerException"); + } + + try { + Character.codePointAt(null, 0, 0); + fail("Expected IndexOutOfBoundsException"); + } catch (IndexOutOfBoundsException e) { + // expected + } catch (Exception e) { + fail("Expected IndexOutOfBoundsException"); + } + + } + /** * @tests java.lang.Character#charValue() */