62 Java ME TCK Framework Developer’s Guide • July 2007

If other keywords (such as positive) are used, they would be included in the same

line as the untrusted keyword. The following is an example of a test description

file that uses runtime,positive, and untrusted keywords.

Marking Trusted Tests

When developing trusted tests, the test writers should use the trusted keyword in

the test description to mark these tests. With the trusted keyword, all the trusted

tests are selected and executed during the trusted security mode. Tests that have the

untrusted keyword are not selected and executed in the trusted security mode.

CODE EXAMPLE 4-14 Test Description for an untrusted Test
<TITLE>Test Specifications and Descriptions for Test</TITLE>
</HEAD>
<BODY>
<H1>Test Specifications and Descriptions for Test</H1>
<HR>
<a name="Test"></a>
<TABLE BORDER=1 SUMMARY="JavaTest Test Description" CLASS=
TestDescription>
<THEAD><TR><TH SCOPE="col">Item</TH><TH SCOPE=
"col">Value</TH></TR></THEAD>
<TR>
<TD SCOPE="row"> <B>title</B> </TD>
<TD> checking untrusted test</TD>
</TR>
<TR>
<TD SCOPE="row"> <B>source</B> </TD>
<TD> <A HREF="Test.java">Test.java</A> </TD>
</TR>
<TR>
<TD SCOPE="row"> <B>executeClass</B> </TD>
<TD> sample.pkg.Test</TD>
</TR>
<TR>
<TD SCOPE="row"> <B>keywords</B> </TD>
<TD>runtime positive untrusted</TD>
</TR>
</TABLE>
</BODY>
</HTML