Index: Arc2DDoubleTest.java =================================================================== --- Arc2DDoubleTest.java (revision 441002) +++ Arc2DDoubleTest.java (working copy) @@ -20,6 +20,7 @@ package java.awt.geom; import java.awt.Rectangle; +import java.awt.geom.Arc2D; public class Arc2DDoubleTest extends GeomTestCase { @@ -45,10 +46,28 @@ public void testCreate2() { assertEquals(new Arc2D.Double(0, 0, 0, 0, 0, 0, Arc2D.CHORD), new Arc2D.Double(Arc2D.CHORD)); + + // Regression test HARMONY-1403 + try { + // Invalid type + new Arc2D.Double(7); + fail("Expected IAE"); + } catch (IllegalArgumentException e) { + // expected + } } public void testCreate3() { assertEquals(new Arc2D.Double(1, 2, 3, 4, 5, 6, Arc2D.CHORD), new Arc2D.Double(new Rectangle(1, 2, 3, 4), 5, 6, Arc2D.PIE)); + + // Regression test HARMONY-1403 + try { + // Invalid type + new Arc2D.Double(new Rectangle(1, 2, 3, 4), 5, 6, 4); + fail("Expected IAE"); + } catch (IllegalArgumentException e) { + // expected + } } public void testGetX() { Index: Arc2DFloatTest.java =================================================================== --- Arc2DFloatTest.java (revision 441002) +++ Arc2DFloatTest.java (working copy) @@ -20,6 +20,7 @@ package java.awt.geom; import java.awt.Rectangle; +import java.awt.geom.Arc2D; public class Arc2DFloatTest extends GeomTestCase { @@ -45,10 +46,28 @@ public void testCreate2() { assertEquals(new Arc2D.Float(0, 0, 0, 0, 0, 0, Arc2D.CHORD), new Arc2D.Float(Arc2D.CHORD)); + + // Regression test HARMONY-1403 + try { + // Invalid type + new Arc2D.Float(-13); + fail("Expected IAE"); + } catch (IllegalArgumentException e) { + // expected + } } public void testCreate3() { assertEquals(new Arc2D.Float(1, 2, 3, 4, 5, 6, Arc2D.CHORD), new Arc2D.Float(new Rectangle(1, 2, 3, 4), 5, 6, Arc2D.PIE)); + + // Regression test HARMONY-1403 + try { + // Invalid type + new Arc2D.Float(new Rectangle(1, 2, 3, 4), 5, 6, 8); + fail("Expected IAE"); + } catch (IllegalArgumentException e) { + // expected + } } public void testGetX() { Index: Arc2DTest.java =================================================================== --- Arc2DTest.java (revision 441002) +++ Arc2DTest.java (working copy) @@ -22,6 +22,7 @@ import java.awt.Dimension; import java.awt.Point; import java.awt.Rectangle; +import java.awt.geom.Arc2D; import java.awt.geom.ShapeTestCase; public class Arc2DTest extends ShapeTestCase { @@ -188,6 +189,15 @@ public void testSetArcType() { a.setArcType(Arc2D.CHORD); assertEquals("Arc type", Arc2D.CHORD, a.getArcType()); + + // Regression test HARMONY-1403 + try { + // Invalid type + a.setArcType(17); + fail("Expected IAE"); + } catch (IllegalArgumentException e) { + // expected + } } public void testGetStartPoint() {