equal
deleted
inserted
replaced
|
1 /* |
|
2 * @test |
|
3 * @bug 6918065 |
|
4 * @summary Test for passing NaN as alpha |
|
5 * should throw IllegalArgumentException |
|
6 */ |
|
7 |
|
8 import java.awt.*; |
|
9 |
|
10 public class TestAlphaCompositeForNaN { |
|
11 public static void main(String[] args) { |
|
12 try { |
|
13 AlphaComposite a = AlphaComposite.getInstance(AlphaComposite.DST, Float.NaN); |
|
14 System.out.println("Failed"); |
|
15 throw new RuntimeException(a + " failed to throw IllegalArgumentException for alpha = " + Float.NaN); |
|
16 } |
|
17 catch (IllegalArgumentException ie) { |
|
18 System.out.println("Passed"); |
|
19 System.out.println("Caught " + ie); |
|
20 } |
|
21 } |
|
22 } |