/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* @test
* @bug 7042594
* @summary Test verifies that ICC_Profile.setData() conforms the spec.
*
* @run main SetDataTest
*/
public class SetDataTest {
static class TestCase {
static byte[] validTRCdata;
static byte[] invalidTRCData;
static {
}
int signature;
boolean useValidData;
boolean isIAEexpected;
boolean useValidData,
boolean isIAEexpected) {
this.desciption = descr;
this.useValidData = useValidData;
this.isIAEexpected = isIAEexpected;
}
public void doTest() {
byte[] data = useValidData
try {
} catch (Throwable e) {
err = e;
e.getMessage());
}
if (isIAEexpected) {
throw new RuntimeException(
"Test failed: expected exception was not thrown");
}
if (!(err instanceof IllegalArgumentException)) {
throw new RuntimeException(
"Unexpected exception was thrown: " +
}
} else {
throw new RuntimeException(
"Unexpected exception was thrown: " +
}
}
}
}
"Selfupdate: update grayTRC with the same data.",
icSigGrayTRCTag, true, false);
"Insert new valid tag",
true, false);
"Insert new tag with invalid contet",
false, true);
"Insert new tag with invalid data and unknown signature",
0x41414141,
false, true);
"Insert new tag with valid data and unknown signatiure",
0x41414141,
true, true);
t.doTest();
}
}
}