Index: awt/src/test/api/java/common/java/awt/image/ColorModelTest.java =================================================================== --- awt/src/test/api/java/common/java/awt/image/ColorModelTest.java (revision 0) +++ awt/src/test/api/java/common/java/awt/image/ColorModelTest.java (revision 0) @@ -0,0 +1,26 @@ +package java.awt.image; + +import junit.framework.TestCase; + +public class ColorModelTest extends TestCase { + + public static void main(String[] args) { + junit.textui.TestRunner.run(ColorModelTest.class); + } + + /** + * Test method for + * {@link java.awt.image.ColorModel#getNormalizedComponents(int[], int, float[], int)}. + */ + public void testGetNormalizedComponentsIntArrayIntFloatArrayInt() { + try { + new IndexColorModel(1, 1, new byte[] { 1, 1, 1 }, 0, false) + .getNormalizedComponents( + new int[] { 1, -23, 5, 67, 89, 0 }, 1, new float[] { + 1, -23, 5, 67, 89, 0 }, 200); + fail("ArrayIndexOutOfBoundsException should be thrown"); //$NON-NLS-1$ + } catch (ArrayIndexOutOfBoundsException ex) { + // expected + } + } +}