2167N/A/*
2167N/A * @test
2167N/A * @bug 6918065
2167N/A * @summary Test for passing NaN as alpha
2167N/A * should throw IllegalArgumentException
2167N/A */
2167N/A
2167N/Aimport java.awt.*;
2167N/A
2167N/Apublic class TestAlphaCompositeForNaN {
2167N/A public static void main(String[] args) {
2167N/A try {
2167N/A AlphaComposite a = AlphaComposite.getInstance(AlphaComposite.DST, Float.NaN);
2167N/A System.out.println("Failed");
2167N/A throw new RuntimeException(a + " failed to throw IllegalArgumentException for alpha = " + Float.NaN);
2167N/A }
2167N/A catch (IllegalArgumentException ie) {
2167N/A System.out.println("Passed");
2167N/A System.out.println("Caught " + ie);
2167N/A }
2167N/A }
2167N/A}