author | bae |
Sat, 04 Jun 2011 23:08:38 +0400 | |
changeset 9784 | 3a0ebf0b855d |
child 21589 | 7bb6e98b1dfb |
permissions | -rw-r--r-- |
9784
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
1 |
/* |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
2 |
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
4 |
* |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
8 |
* |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
13 |
* accompanied this code). |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
14 |
* |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
18 |
* |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
21 |
* questions. |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
22 |
*/ |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
23 |
|
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
24 |
/** |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
25 |
* @test |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
26 |
* @bug 7042594 |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
27 |
* @summary Test verifies that ICC_Profile.setData() conforms the spec. |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
28 |
* |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
29 |
* @run main SetDataTest |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
30 |
*/ |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
31 |
|
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
32 |
|
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
33 |
import java.util.ArrayList; |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
34 |
import java.util.List; |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
35 |
import java.awt.color.ICC_Profile; |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
36 |
import static java.awt.color.ICC_ColorSpace.CS_GRAY; |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
37 |
import static java.awt.color.ICC_Profile.icSigGrayTRCTag; |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
38 |
import static java.awt.color.ICC_Profile.icSigRedTRCTag; |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
39 |
import static java.awt.color.ICC_Profile.icSigGreenTRCTag; |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
40 |
|
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
41 |
public class SetDataTest { |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
42 |
|
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
43 |
static class TestCase { |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
44 |
|
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
45 |
static ICC_Profile profile; |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
46 |
static byte[] validTRCdata; |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
47 |
static byte[] invalidTRCData; |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
48 |
|
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
49 |
static { |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
50 |
profile = ICC_Profile.getInstance(CS_GRAY); |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
51 |
validTRCdata = profile.getData(icSigGrayTRCTag); |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
52 |
invalidTRCData = new byte[]{0x42, 0x42, 0x42, 0x42, 1, 3, 4, 6,}; |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
53 |
} |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
54 |
String desciption; |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
55 |
int signature; |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
56 |
boolean useValidData; |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
57 |
Throwable err; |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
58 |
boolean isIAEexpected; |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
59 |
|
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
60 |
public TestCase(String descr, int sig, |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
61 |
boolean useValidData, |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
62 |
boolean isIAEexpected) { |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
63 |
this.desciption = descr; |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
64 |
this.signature = sig; |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
65 |
|
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
66 |
this.useValidData = useValidData; |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
67 |
this.isIAEexpected = isIAEexpected; |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
68 |
|
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
69 |
} |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
70 |
|
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
71 |
public void doTest() { |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
72 |
System.out.println(desciption); |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
73 |
byte[] data = useValidData |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
74 |
? validTRCdata : invalidTRCData; |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
75 |
err = null; |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
76 |
try { |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
77 |
profile.setData(signature, data); |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
78 |
} catch (Throwable e) { |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
79 |
err = e; |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
80 |
System.out.println("Got exception: " + |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
81 |
e.getClass().getName() + ": " + |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
82 |
e.getMessage()); |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
83 |
} |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
84 |
|
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
85 |
if (isIAEexpected) { |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
86 |
if (err == null) { |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
87 |
throw new RuntimeException( |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
88 |
"Test failed: expected exception was not thrown"); |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
89 |
} |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
90 |
if (!(err instanceof IllegalArgumentException)) { |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
91 |
throw new RuntimeException( |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
92 |
"Unexpected exception was thrown: " + |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
93 |
err.getMessage(), err); |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
94 |
} |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
95 |
} else { |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
96 |
if (err != null) { |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
97 |
throw new RuntimeException( |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
98 |
"Unexpected exception was thrown: " + |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
99 |
err.getMessage(), err); |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
100 |
} |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
101 |
} |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
102 |
System.out.println("Testcase PASSED"); |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
103 |
} |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
104 |
} |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
105 |
|
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
106 |
public static void main(String[] args) { |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
107 |
List<TestCase> tests = new ArrayList<TestCase>(); |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
108 |
|
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
109 |
TestCase selfupdate = new TestCase( |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
110 |
"Selfupdate: update grayTRC with the same data.", |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
111 |
icSigGrayTRCTag, true, false); |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
112 |
tests.add(selfupdate); |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
113 |
|
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
114 |
TestCase newValdTag = new TestCase( |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
115 |
"Insert new valid tag", |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
116 |
icSigRedTRCTag, |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
117 |
true, false); |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
118 |
tests.add(newValdTag); |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
119 |
|
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
120 |
TestCase newInvalidTag = new TestCase( |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
121 |
"Insert new tag with invalid contet", |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
122 |
icSigGreenTRCTag, |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
123 |
false, true); |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
124 |
tests.add(newInvalidTag); |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
125 |
|
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
126 |
TestCase newUnknowInvalidTag = new TestCase( |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
127 |
"Insert new tag with invalid data and unknown signature", |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
128 |
0x41414141, |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
129 |
false, true); |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
130 |
tests.add(newUnknowInvalidTag); |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
131 |
|
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
132 |
TestCase newUnknownValidTag = new TestCase( |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
133 |
"Insert new tag with valid data and unknown signatiure", |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
134 |
0x41414141, |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
135 |
true, true); |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
136 |
tests.add(newUnknownValidTag); |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
137 |
|
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
138 |
for (TestCase t: tests) { |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
139 |
t.doTest(); |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
140 |
} |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
141 |
System.out.println("Test passed!."); |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
142 |
} |
3a0ebf0b855d
7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64.
bae
parents:
diff
changeset
|
143 |
} |