Index: BidiTest.java =================================================================== --- BidiTest.java (revision 428277) +++ BidiTest.java (working copy) @@ -100,6 +100,41 @@ } catch (IllegalArgumentException e) { // expected } + + try { + bd = new Bidi(new char[] { 't','t','t'}, -1, new byte[] { 2, 2 }, 1, 1, 1); + fail("should be IAE"); + } catch (IllegalArgumentException e) { + // expected + } + + try { + bd = new Bidi(new char[] { 't','t','t'}, 1, new byte[] { 2, 2 }, -1, 1, 1); + fail("should be IAE"); + } catch (IllegalArgumentException e) { + // expected + } + + try { + bd = new Bidi(new char[] { 't','t','t'}, 1, new byte[] { 2, 2 }, 1, -1, 1); + fail("should be IAE"); + } catch (IllegalArgumentException e) { + // expected + } + + try { + bd = new Bidi(new char[] {}, 5, new byte[] { 2, 2, 2, 2, 2, 2 }, 8, Integer.MAX_VALUE, 5); + fail("should be IAE"); + } catch (IllegalArgumentException e) { + // expected + } + + try { + bd = new Bidi(new char[] {'o'}, 0, new byte[] { 2, 2}, 2, 0, 2 ); + } catch (IllegalArgumentException e) { + fail(); + } + } public void testEmptyParagraph() {