mirror of
https://github.com/rn10950/RetroZilla.git
synced 2024-11-16 12:30:13 +01:00
3222 lines
77 KiB
HTML
3222 lines
77 KiB
HTML
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<meta name="GENERATOR" content="Mozilla/4.7 [en] (WinNT; I) [Netscape]">
|
|
<title>OJI Test Analysis. Interfaces implemented by OJI module. JNIEnv. </title>
|
|
</head>
|
|
<body>
|
|
|
|
<h2>
|
|
OJI API Test Analysis. Interfaces implemented by OJI module. JNIEnv.</h2>
|
|
<b><font size=-1>Important note concerning JNI testing (from JNI specification):</font></b>
|
|
<p><i><font size=-1>Reporting Programming Errors</font></i><font size=-1></font>
|
|
<p><i><font size=-1>The JNI does not check for programming errors such
|
|
as passing in NULL pointers or illegal argument types. Illegal argument</font></i>
|
|
<br><i><font size=-1>types includes such things as using a normal Java
|
|
object instead of a Java class object. The JNI does not check for these</font></i>
|
|
<br><i><font size=-1>programming errors for the following reasons:</font></i><font size=-1></font>
|
|
<p><i><font size=-1> Forcing JNI functions
|
|
to check for all possible error conditions degrades the performance of
|
|
normal (correct) native</font></i>
|
|
<br><i><font size=-1> methods.</font></i>
|
|
<br><i><font size=-1> In many cases, there
|
|
is not enough runtime type information to perform such checking.</font></i><font size=-1></font>
|
|
<p><i><font size=-1>Most C library functions do not guard against programming
|
|
errors. The printf() function, for example, usually causes a</font></i>
|
|
<br><i><font size=-1>runtime error, rather than returning an error code,
|
|
when it receives an invalid address. Forcing C library functions to check
|
|
for</font></i>
|
|
<br><i><font size=-1>all possible error conditions would likely result
|
|
in such checks to be duplicated--once in the user code, and then again
|
|
in the</font></i>
|
|
<br><i><font size=-1>library.</font></i><font size=-1></font>
|
|
<p><i><font size=-1>The programmer must not pass illegal pointers or arguments
|
|
of the wrong type to JNI functions. Doing so could result in</font></i>
|
|
<br><i><font size=-1>arbitrary consequences, including a corrupted system
|
|
state or VM crash.</font></i><font size=-1></font>
|
|
<p><font size=-1>So the purposes of testing OJI JNI implementation
|
|
are next:</font>
|
|
<br><font size=-1>- checking on correctnesses in "normal" cases</font>
|
|
<br><font size=-1>- checking that this implementation (that is really wrapper
|
|
on implementation provided by Java Plugin) is not degrading the provided
|
|
implementation in "negative" cases</font>
|
|
<br><font size=-1></font> <font size=-1></font>
|
|
<p><b><font size=-1>Testcases description:</font></b><font size=-1></font>
|
|
<p><font size=-1>jint GetVersion();</font>
|
|
<br><font size=-1>Test cases number: 1</font><font size=-1></font>
|
|
<p><font size=-1>jclass DefineClass(jobject loader, const jbyte *buf, jsize
|
|
bufLen);</font>
|
|
<br><font size=-1>Combinations:</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=4 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>loader</font></td>
|
|
|
|
<td><font size=-1>buf</font></td>
|
|
|
|
<td><font size=-1>bufLen</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NON NULL</font></td>
|
|
|
|
<td><font size=-1>correctly formed</font></td>
|
|
|
|
<td><font size=-1>correct</font></td>
|
|
|
|
<td><font size=-1>Class correctly defined</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>incorrectly formed</font></td>
|
|
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>correctly formed</font></td>
|
|
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Test cases number: 4</font><font size=-1></font>
|
|
<p><font size=-1>jclass FindClass(const char *name);</font>
|
|
<br><font size=-1>Combinations:</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=2 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>name</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>Name of existing class</font></td>
|
|
|
|
<td><font size=-1>Correct class is found</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>With array signature character ("[")</font></td>
|
|
|
|
<td><font size=-1>Correct class is found</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>Name of existing interface</font></td>
|
|
|
|
<td><font size=-1>Correct class is found</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>Name of existing abstract class</font></td>
|
|
|
|
<td><font size=-1>Correct class is found</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>Name of non-existing class</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>Empty string</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Test cases number: 7</font><font size=-1></font>
|
|
<p><font size=-1>jclass GetSuperclass(jclass clazz);</font>
|
|
<br><font size=-1>Combinations:</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=2 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>clazz</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>Any class (not java.lang.Object)</font></td>
|
|
|
|
<td><font size=-1>superclass</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>java.lang.Object</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>interface</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Test cases number: 4</font><font size=-1></font>
|
|
<p><font size=-1>jboolean IsAssignableFrom(jclass clazz1, jclass clazz2);</font>
|
|
<br><font size=-1>Combinations:</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=3 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>clazz1</font></td>
|
|
|
|
<td><font size=-1>clazz2</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>Any class</font></td>
|
|
|
|
<td><font size=-1>the same class</font></td>
|
|
|
|
<td><font size=-1>JNI_TRUE</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>Subclass of the clazz2</font></td>
|
|
|
|
<td><font size=-1>Any class</font></td>
|
|
|
|
<td><font size=-1>JNI_TRUE</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>Implements the clazz2</font></td>
|
|
|
|
<td><font size=-1>Any interface</font></td>
|
|
|
|
<td><font size=-1>JNI_TRUE</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>Any class</font></td>
|
|
|
|
<td><font size=-1>Any class that isn't the superclass of clazz1</font></td>
|
|
|
|
<td><font size=-1>JNI_FALSE</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>JNI_FALSE</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Test cases number: 5</font><font size=-1></font>
|
|
<p><font size=-1>jint Throw(jthrowable obj);</font>
|
|
<br><font size=-1>Combinations:</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=2 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>obj</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>Instance of any subclass of throwable</font></td>
|
|
|
|
<td><font size=-1>0, should be really thrown</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>negative, should not be thrown</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Test cases number: 2</font><font size=-1></font>
|
|
<p><font size=-1>jint ThrowNew(jclass clazz, const char *message);</font>
|
|
<br><font size=-1>Combinations:</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=3 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>clazz</font></td>
|
|
|
|
<td><font size=-1>message</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>Any subclass of throwable</font></td>
|
|
|
|
<td><font size=-1>some non-empty message</font></td>
|
|
|
|
<td><font size=-1>0, should be really thrown</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>empty message</font></td>
|
|
|
|
<td><font size=-1>0, should be really thrown</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>0, should be really thrown</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>Isn't subclass of throwable</font></td>
|
|
|
|
<td><font size=-1>some non-empty message</font></td>
|
|
|
|
<td><font size=-1>negative, should not be thrown</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>negative, should not be thrown</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Test cases number: 5</font><font size=-1></font>
|
|
<p><font size=-1>jthrowable ExceptionOccurred();</font>
|
|
<br><font size=-1>Combinations:</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=2 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>there exception is being thrown</font></td>
|
|
|
|
<td><font size=-1>the being thrown object</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>no exception is currently being thrown</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Test cases number: 2</font><font size=-1></font>
|
|
<p><font size=-1>void ExceptionDescribe();</font>
|
|
<br><font size=-1>Combinations:</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=2 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>there exception is being thrown</font></td>
|
|
|
|
<td><font size=-1>the exception is printed</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>no exception is currently being thrown</font></td>
|
|
|
|
<td><font size=-1>no effect</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Test cases number: 2</font><font size=-1></font>
|
|
<p><font size=-1>void ExceptionClear();</font>
|
|
<br><font size=-1>Combinations:</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=2 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>there exception is being thrown</font></td>
|
|
|
|
<td><font size=-1>the exception is cleared</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>no exception is currently being thrown</font></td>
|
|
|
|
<td><font size=-1>no effect</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Test cases number: 2</font><font size=-1></font>
|
|
<p><font size=-1>void FatalError(const char *msg);</font>
|
|
<br><font size=-1>Combinations:</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=2 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>msg</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>the non-empty message</font></td>
|
|
|
|
<td><font size=-1>the function doesn't return, crash</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>the empty message</font></td>
|
|
|
|
<td><font size=-1>the function doesn't return, crash</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>the function doesn't return, crash</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Test cases number: 3</font><font size=-1></font>
|
|
<p><font size=-1>jobject NewGlobalRef(jobject obj);</font>
|
|
<br><font size=-1>Combinations:</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=2 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>obj</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some jobject</font></td>
|
|
|
|
<td><font size=-1>new global ref</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>?(NULL)</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Test cases number: 2</font><font size=-1></font>
|
|
<p><font size=-1>void DeleteGlobalRef(jobject globalRef);</font>
|
|
<br><font size=-1>Combinations:</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=2 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>globalRef</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>Some jobject returned as new global ref</font></td>
|
|
|
|
<td><font size=-1>global ref is deleted</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>no effect</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Test cases number: 2</font><font size=-1></font>
|
|
<p><font size=-1>void DeleteLocalRef(jobject localRef);</font>
|
|
<br><font size=-1>Combinations:</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=2 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>localRef</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some jobject</font></td>
|
|
|
|
<td><font size=-1>local ref is deleted</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>no effect</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Test cases number: 2</font><font size=-1></font>
|
|
<p><font size=-1>jobject AllocObject(jclass clazz);</font>
|
|
<br><font size=-1>Combinations:</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=2 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>clazz</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>Any non-abstract class</font></td>
|
|
|
|
<td><font size=-1>reference on newly constructed java object</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>abstract class</font></td>
|
|
|
|
<td><font size=-1>NULL, InstantiationException is thrown</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>interface</font></td>
|
|
|
|
<td><font size=-1>NULL, InstantiationException is thrown</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Test cases number: 4</font><font size=-1></font>
|
|
<p><font size=-1>jobject NewObject(jclass clazz, jmethodID methodID, ...);</font><font size=-1></font>
|
|
<p><font size=-1>jobject NewObjectA(jclass clazz, jmethodID methodID, jvalue
|
|
*args);</font><font size=-1></font>
|
|
<p><font size=-1>jobject NewObjectV(jclass clazz, jmethodID methodID, va_list
|
|
args);</font><font size=-1></font>
|
|
<p><font size=-1>Combinations:</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=4 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>clazz</font></td>
|
|
|
|
<td><font size=-1>methodID</font></td>
|
|
|
|
<td><font size=-1>args</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>Any non-abstract class</font></td>
|
|
|
|
<td><font size=-1>ID of public, private, package visible or protected constructor
|
|
with no args</font></td>
|
|
|
|
<td><font size=-1>No arguments</font></td>
|
|
|
|
<td><font size=-1>reference on new object</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>ID of public constructor that throws exception</font></td>
|
|
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>reference on new object, exception is thrown</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>ID of public with args (all primitive and Object)</font></td>
|
|
|
|
<td><font size=-1>required args</font></td>
|
|
|
|
<td><font size=-1>reference on new object</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>non-constructor method ID</font></td>
|
|
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>Abstract class</font></td>
|
|
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>NULL, InstantiationException is thrown</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Test cases number for every method: 9</font>
|
|
<br><font size=-1>Test cases number: 27</font><font size=-1></font>
|
|
<p><font size=-1>jclass GetObjectClass(jobject obj);</font>
|
|
<br><font size=-1>Combinations:</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=2 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>obj</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>Some jobject </font></td>
|
|
|
|
<td><font size=-1>it's class </font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Test cases number: 1</font><font size=-1></font>
|
|
<p><font size=-1>jboolean IsInstanceOf(jobject obj, jclass clazz);</font>
|
|
<br><font size=-1>Combinations:</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=3 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>obj</font></td>
|
|
|
|
<td><font size=-1>clazz</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some jobject</font></td>
|
|
|
|
<td><font size=-1>it's class</font></td>
|
|
|
|
<td><font size=-1>JNI_TRUE</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>it's superclass</font></td>
|
|
|
|
<td><font size=-1>JNI_TRUE</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>class that isn't it's class or superclass</font></td>
|
|
|
|
<td><font size=-1>JNI_FALSE</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>any class</font></td>
|
|
|
|
<td><font size=-1>JNI_TRUE</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>?(JNI_TRUE)</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Test cases number: 5</font><font size=-1></font>
|
|
<p><font size=-1>jboolean IsSameObject(jobject ref1, jobject ref2);</font>
|
|
<br><font size=-1>Combinations:</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=3 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>ref1</font></td>
|
|
|
|
<td><font size=-1>ref2</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some reference on the Java object</font></td>
|
|
|
|
<td><font size=-1>reference on the same object</font></td>
|
|
|
|
<td><font size=-1>JNI_TRUE</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>reference on other object</font></td>
|
|
|
|
<td><font size=-1>JNI_FALSE</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>JNI_FALSE</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>JNI_TRUE</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Test cases number: 4</font><font size=-1></font>
|
|
<p><font size=-1>jfieldID GetFieldID(jclass clazz, const char *name, const
|
|
char *sig);</font>
|
|
<br><font size=-1>Combinations (based on next variations):</font>
|
|
<br><b><font size=-1>Field types:</font></b>
|
|
<br><font size=-1>boolean</font>
|
|
<br><font size=-1>byte</font>
|
|
<br><font size=-1>char</font>
|
|
<br><font size=-1>short</font>
|
|
<br><font size=-1>int</font>
|
|
<br><font size=-1>long</font>
|
|
<br><font size=-1>float</font>
|
|
<br><font size=-1>double</font>
|
|
<br><font size=-1>object(non-array)</font>
|
|
<br><font size=-1>array</font><font size=-1></font>
|
|
<p><b><font size=-1>Access modifiers:</font></b>
|
|
<br><font size=-1>public</font>
|
|
<br><font size=-1>protected</font>
|
|
<br><font size=-1>no modifier - package</font>
|
|
<br><font size=-1>private</font><font size=-1></font>
|
|
<p><b><font size=-1>Other modifiers:</font></b>
|
|
<br><font size=-1>no-modifier</font>
|
|
<br><font size=-1>final</font>
|
|
<br><font size=-1>transient</font>
|
|
<br><font size=-1>volatile</font><font size=-1></font>
|
|
<p><b><font size=-1>Inherited from:</font></b>
|
|
<br><font size=-1>not inherited</font>
|
|
<br><font size=-1>superclass</font><font size=-1></font>
|
|
<p><font size=-1>So the <selected> combinations for variable will be
|
|
(note: the {other modifiers} will not be combined</font>
|
|
<br><font size=-1>one with another):</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=5 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>Number</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>{Field types}</font></td>
|
|
|
|
<td><font size=-1>public</font></td>
|
|
|
|
<td><font size=-1>no-modifier</font></td>
|
|
|
|
<td><font size=-1>not inherited</font></td>
|
|
|
|
<td><font size=-1>10</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>{int, object}</font></td>
|
|
|
|
<td><font size=-1>{access modifiers}</font></td>
|
|
|
|
<td><font size=-1>no-modifier</font></td>
|
|
|
|
<td><font size=-1>{inherited from}</font></td>
|
|
|
|
<td><font size=-1>16</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>{int, object}</font></td>
|
|
|
|
<td><font size=-1>public</font></td>
|
|
|
|
<td><font size=-1>{other modifiers}</font></td>
|
|
|
|
<td><font size=-1>not inherited</font></td>
|
|
|
|
<td><font size=-1>8</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1>Total: 34 - 4(intersection)=30</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=4 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>clazz</font></td>
|
|
|
|
<td><font size=-1>name</font></td>
|
|
|
|
<td><font size=-1>sig</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some class</font></td>
|
|
|
|
<td><font size=-1><selected> existing variable </font></td>
|
|
|
|
<td><font size=-1>appropriate</font></td>
|
|
|
|
<td><font size=-1>field ID, except the cases of private in superclass - </font>
|
|
<br><font size=-1>NULL will be in such cases</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>non-existing </font></td>
|
|
|
|
<td><font size=-1>some sig</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>existing</font></td>
|
|
|
|
<td><font size=-1>some incorrect sig</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>some sig</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>existing</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>some name</font></td>
|
|
|
|
<td><font size=-1>some sig</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font><font size=-1></font>
|
|
<p><font size=-1>Test cases number: 35</font><font size=-1></font>
|
|
<p><font size=-1>NativeType Get<type>Field(jobject obj, jfieldID fieldID);</font><font size=-1></font>
|
|
<p><font size=-1>The test cases for these methods are the testcases of
|
|
GetFieldID method where correct field ID should be returned with varying
|
|
on field values. Concerning the "negative" cases: it is explicitly specified
|
|
what parameters should be valid.</font>
|
|
<br><b><font size=-1>Values variations:</font></b>
|
|
<br><font size=-1>jboolean: JNI_TRUE, JNI_FALSE</font>
|
|
<br><font size=-1>jbyte: min, max</font>
|
|
<br><font size=-1>jchar: some of ASCII (only 1st byte is significant),
|
|
some character with 2 significant bytes</font>
|
|
<br><font size=-1>jshort: min, max</font>
|
|
<br><font size=-1>jint: min, max</font>
|
|
<br><font size=-1>jlong: min, max</font>
|
|
<br><font size=-1>jfloat: min, max</font>
|
|
<br><font size=-1>jdouble: min, max</font>
|
|
<br><font size=-1>jobject(non-array): NULL, NON-NULL</font>
|
|
<br><font size=-1>jarray: NULL, NON-NULL</font><font size=-1></font>
|
|
<p><font size=-1>Test cases number: 58</font>
|
|
<br><font size=-1></font> <font size=-1></font>
|
|
<p><font size=-1>void Set<type>Field(jobject obj, jfieldID fieldID,
|
|
NativeType value);</font><font size=-1></font>
|
|
<p><font size=-1>In addition to the possible variations of the variable
|
|
the next variations can be used for values of</font>
|
|
<br><font size=-1>different types:</font>
|
|
<br><b><font size=-1>Values variations:</font></b>
|
|
<br><font size=-1>jboolean: JNI_TRUE, JNI_FALSE</font>
|
|
<br><font size=-1>jbyte: min, max</font>
|
|
<br><font size=-1>jchar: some of ASCII (only 1st byte is significant),
|
|
some character with 2 significant bytes</font>
|
|
<br><font size=-1>jshort: min, max</font>
|
|
<br><font size=-1>jint: min, max</font>
|
|
<br><font size=-1>jlong: min, max</font>
|
|
<br><font size=-1>jfloat: min, max</font>
|
|
<br><font size=-1>jdouble: min, max</font>
|
|
<br><font size=-1>jobject(non-array): NULL, NON-NULL</font>
|
|
<br><font size=-1>jarray: NULL, NON-NULL</font>
|
|
<br><font size=-1></font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=4 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>obj</font></td>
|
|
|
|
<td><font size=-1>fieldID</font></td>
|
|
|
|
<td><font size=-1>value</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some obj</font></td>
|
|
|
|
<td><font size=-1>valid fieldID for variable from <selected> (where
|
|
it possible, i.e. except the cases of private in superclass ) </font></td>
|
|
|
|
<td><font size=-1>corresponding to variable type from {values
|
|
variations}</font></td>
|
|
|
|
<td><font size=-1>The value will be correctly set, except the cases of
|
|
final.</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Note concerning the "negative" cases with obj and fieldID
|
|
parameters: it is specified what this parameters should be valid.</font><font size=-1></font>
|
|
<p><font size=-1>Test cases number: 58</font><font size=-1></font>
|
|
<p><font size=-1>jmethodID GetMethodID(jclass clazz, const char *name,
|
|
const char *sig);</font>
|
|
<br><font size=-1>Combinations (based on next variations):</font>
|
|
<br><b><font size=-1>Class:</font></b>
|
|
<br><font size=-1>non-abstract</font>
|
|
<br><font size=-1>abstract</font>
|
|
<br><font size=-1>interface</font><font size=-1></font>
|
|
<p><b><font size=-1>Access modifiers:</font></b>
|
|
<br><font size=-1>public</font>
|
|
<br><font size=-1>protected</font>
|
|
<br><font size=-1>no modifier - package</font>
|
|
<br><font size=-1>private</font><font size=-1></font>
|
|
<p><b><font size=-1>Other modifiers:</font></b>
|
|
<br><font size=-1>no-modifier</font>
|
|
<br><font size=-1>final</font>
|
|
<br><font size=-1>synchronized</font>
|
|
<br><font size=-1>native</font>
|
|
<br><font size=-1>abstract</font><font size=-1></font>
|
|
<p><b><font size=-1>Inherited from:</font></b>
|
|
<br><font size=-1>not inherited</font>
|
|
<br><font size=-1>superclass</font>
|
|
<br><font size=-1>interface</font><font size=-1></font>
|
|
<p><font size=-1>So the <selected> methods will be:</font>
|
|
<table BORDER COLS=5 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>Number</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>interface</font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>not inherited and </font>
|
|
<br><font size=-1>inherited from superinterface</font></td>
|
|
|
|
<td><font size=-1>2</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>abstract class</font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>inherited from interface</font></td>
|
|
|
|
<td><font size=-1>1</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>abstract class</font></td>
|
|
|
|
<td><font size=-1>except private</font></td>
|
|
|
|
<td><font size=-1>abstract</font></td>
|
|
|
|
<td><font size=-1>not inherited and </font>
|
|
<br><font size=-1>inherited from superclass</font></td>
|
|
|
|
<td><font size=-1>6</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>non-abstract</font></td>
|
|
|
|
<td><font size=-1>{access modifiers}</font></td>
|
|
|
|
<td><font size=-1>no-modifier</font></td>
|
|
|
|
<td><font size=-1>not inherited and </font>
|
|
<br><font size=-1>inherited from superclass</font></td>
|
|
|
|
<td><font size=-1>8</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>non-abstract</font></td>
|
|
|
|
<td><font size=-1>public</font></td>
|
|
|
|
<td><font size=-1>except abstract</font></td>
|
|
|
|
<td><font size=-1>not inherited</font></td>
|
|
|
|
<td><font size=-1>4</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>non-abstract</font></td>
|
|
|
|
<td><font size=-1>public</font></td>
|
|
|
|
<td><font size=-1>no-modifier</font></td>
|
|
|
|
<td><font size=-1>override</font></td>
|
|
|
|
<td><font size=-1>1</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>constructor in abstract and non-abstract</font></td>
|
|
|
|
<td><font size=-1>{access modifiers}</font></td>
|
|
|
|
<td><font size=-1>no-modifier</font></td>
|
|
|
|
<td><font size=-1>not inherited</font></td>
|
|
|
|
<td><font size=-1>8</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1>Total: 30-1(intersection)=29</font><font size=-1></font>
|
|
<p><b><font size=-1>Varying on signatures:</font></b>
|
|
<br><font size=-1>"()V"</font>
|
|
<br><font size=-1>"(ZBCLSIJFDL<some class>;[L<some class>;)V"</font>
|
|
<br><font size=-1>"(ZBCLSIJFDL<some class>;[L<some class>;)I"</font>
|
|
<br><font size=-1>"(ZBCLSIJFDL<some class>;[L<some class>;)L<some
|
|
class>;"</font>
|
|
<br><font size=-1>"(ZBCLSIJFDL<some class>;[L<some class>;)[L<some
|
|
class>;"</font>
|
|
<br><font size=-1>So in <selected> set will be added these varying for
|
|
public non-inherited method of non-abstract class.</font>
|
|
<br><font size=-1>Total: +5</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=4 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>clazz</font></td>
|
|
|
|
<td><font size=-1>name</font></td>
|
|
|
|
<td><font size=-1>sig</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some class</font></td>
|
|
|
|
<td><font size=-1>name of the existing method from <selected></font></td>
|
|
|
|
<td><font size=-1>correct signature</font></td>
|
|
|
|
<td><font size=-1>Method ID, except the cases of private in superclass
|
|
- NULL should be returned in these cases</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>name of non-existing method</font></td>
|
|
|
|
<td><font size=-1>some sig</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>name of existing method</font></td>
|
|
|
|
<td><font size=-1>incorrect sig</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>some sig</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>name of existing method</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>some name</font></td>
|
|
|
|
<td><font size=-1>some sig</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1>Test cases number: 39</font>
|
|
<br><font size=-1></font> <font size=-1></font>
|
|
<p><font size=-1>NativeType Call<type>Method(jobject obj, jmethodID
|
|
methodID, ...);</font><font size=-1></font>
|
|
<p><font size=-1>NativeType Call<type>MethodA(jobject obj, jmethodID
|
|
methodID, jvalue *args);</font><font size=-1></font>
|
|
<p><font size=-1>NativeType Call<type>MethodV(jobject obj, jmethodID
|
|
methodID, va_list args);</font><font size=-1></font>
|
|
<p><font size=-1>Combinations:</font>
|
|
<br><font size=-1>Note: The implementation under testing wrapes the nsISecureEnv
|
|
that exports the only one CallMethod which accepts the arguments
|
|
in the form of jvalue* and is used for implementation of all these methods.
|
|
So the <selected> combinations (based on modifiers/inheritance) from
|
|
GetMethodID method will be used only with one method - CallIntMethod. The
|
|
combinations based on varying on values will be used for all 3 set of methods.</font>
|
|
<br><b><font size=-1><selected> combinations (based on modifiers/inheritance)</font></b>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=5 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>Number</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>non-abstract</font></td>
|
|
|
|
<td><font size=-1>{access modifiers}</font></td>
|
|
|
|
<td><font size=-1>no-modifier</font></td>
|
|
|
|
<td><font size=-1>not inherited and </font>
|
|
<br><font size=-1>inherited from superclass</font></td>
|
|
|
|
<td><font size=-1>8</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>non-abstract</font></td>
|
|
|
|
<td><font size=-1>public</font></td>
|
|
|
|
<td><font size=-1>except abstract</font></td>
|
|
|
|
<td><font size=-1>not inherited</font></td>
|
|
|
|
<td><font size=-1>4</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>non-abstract</font></td>
|
|
|
|
<td><font size=-1>public</font></td>
|
|
|
|
<td><font size=-1>no-modifier</font></td>
|
|
|
|
<td><font size=-1>override</font></td>
|
|
|
|
<td><font size=-1>1</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><b><font size=-1>Values variations:</font></b>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=3 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>Combination 1</font></td>
|
|
|
|
<td><font size=-1>Combination 2</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>jboolean</font></td>
|
|
|
|
<td><font size=-1>JNI_TRUE</font></td>
|
|
|
|
<td><font size=-1>JNI_FALSE</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>jbyte</font></td>
|
|
|
|
<td><font size=-1>min</font></td>
|
|
|
|
<td><font size=-1>max</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>jchar</font></td>
|
|
|
|
<td><font size=-1>some of ASCII (only 1st byte is significant)</font></td>
|
|
|
|
<td><font size=-1>some character with 2 significant bytes</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>jshort</font></td>
|
|
|
|
<td><font size=-1>min</font></td>
|
|
|
|
<td><font size=-1>max</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>jint</font></td>
|
|
|
|
<td><font size=-1>min</font></td>
|
|
|
|
<td><font size=-1>max</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>jlong</font></td>
|
|
|
|
<td><font size=-1>min</font></td>
|
|
|
|
<td><font size=-1>max</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>jfloat</font></td>
|
|
|
|
<td><font size=-1>min</font></td>
|
|
|
|
<td><font size=-1>max</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>jdouble</font></td>
|
|
|
|
<td><font size=-1>min</font></td>
|
|
|
|
<td><font size=-1>max</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>jobject(non-array)</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>NON-NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>jarray</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>NON-NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td ALIGN=CENTER COLSPAN="3"><font size=-1>Return values for methods</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1><type> is Boolean</font></td>
|
|
|
|
<td><font size=-1>JNI_TRUE</font></td>
|
|
|
|
<td><font size=-1>JNI_FALSE</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1><type> is Byte</font></td>
|
|
|
|
<td><font size=-1>min</font></td>
|
|
|
|
<td><font size=-1>max</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1><type> is Char</font></td>
|
|
|
|
<td><font size=-1>some of ASCII (only 1st byte is significant)</font></td>
|
|
|
|
<td><font size=-1>some character with 2 significant bytes</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1><type> is Short</font></td>
|
|
|
|
<td><font size=-1>min</font></td>
|
|
|
|
<td><font size=-1>max</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1><type> is Int</font></td>
|
|
|
|
<td><font size=-1>min</font></td>
|
|
|
|
<td><font size=-1>max</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1><type> is Long</font></td>
|
|
|
|
<td><font size=-1>min</font></td>
|
|
|
|
<td><font size=-1>max</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1><type> is Float</font></td>
|
|
|
|
<td><font size=-1>min</font></td>
|
|
|
|
<td><font size=-1>max</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1><type> is Double</font></td>
|
|
|
|
<td><font size=-1>min</font></td>
|
|
|
|
<td><font size=-1>max</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1><type> is Object</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>NON-NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1><type> is Object</font></td>
|
|
|
|
<td><font size=-1>NULL jarray</font></td>
|
|
|
|
<td><font size=-1>NON-NULL jarray</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1><type> is Void</font></td>
|
|
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>-</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=6 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>obj</font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>jmethodID</font></td>
|
|
|
|
<td><font size=-1>args</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
|
|
<td><font size=-1>Number</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some obj</font></td>
|
|
|
|
<td><font size=-1>CallIntMethod</font></td>
|
|
|
|
<td><font size=-1>ID of <selected> method with signature "(ZBCLSIJFDL<some
|
|
class>;[L<some class>;)I"</font></td>
|
|
|
|
<td><font size=-1>some args</font></td>
|
|
|
|
<td><font size=-1>corresponding result</font></td>
|
|
|
|
<td><font size=-1>12</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some obj</font></td>
|
|
|
|
<td><font size=-1>Call<type>Method</font>
|
|
<br><font size=-1>Call<type>MethodA</font>
|
|
<br><font size=-1>Call<type>MethodV</font></td>
|
|
|
|
<td><font size=-1>ID of public non-inherited method with signature "(ZBCLSIJFDL<some
|
|
class>;[L<some class>;)?" where ? is run on the all set of possibilities </font></td>
|
|
|
|
<td><font size=-1>Combination 1 and 2</font></td>
|
|
|
|
<td><font size=-1>corresponding result</font></td>
|
|
|
|
<td><font size=-1>66</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some obj</font></td>
|
|
|
|
<td><font size=-1>CallIntMethod</font>
|
|
<br><font size=-1>CallIntMethodA</font>
|
|
<br><font size=-1>CallIntMethodV</font></td>
|
|
|
|
<td><font size=-1>ID of public non-inherited method with signature "()I" </font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>corresponding result</font></td>
|
|
|
|
<td><font size=-1>3</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some obj</font></td>
|
|
|
|
<td><font size=-1>CallIntMethod</font>
|
|
<br><font size=-1>CallIntMethodA</font>
|
|
<br><font size=-1>CallIntMethodV</font></td>
|
|
|
|
<td><font size=-1>ID of public non-inherited method that throws exception</font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>Exception should be thrown</font></td>
|
|
|
|
<td><font size=-1>3</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some obj</font></td>
|
|
|
|
<td><font size=-1>CallIntMethod</font></td>
|
|
|
|
<td><font size=-1>ID of public inherited method which was received using
|
|
superclass</font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>corresponding result</font></td>
|
|
|
|
<td><font size=-1>1</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Number of test cases: 84</font>
|
|
<br><font size=-1></font> <font size=-1></font>
|
|
<p><font size=-1>NativeType CallNonvirtual<type>Method(jobject obj,
|
|
jclass clazz, jmethodID methodID, ...);</font><font size=-1></font>
|
|
<p><font size=-1>NativeType CallNonvirtual<type>MethodA(jobject obj,
|
|
jclass clazz, jmethodID methodID, jvalue *args);</font><font size=-1></font>
|
|
<p><font size=-1>NativeType CallNonvirtual<type>MethodV(jobject obj,
|
|
jclass clazz, jmethodID methodID, va_list args);</font><font size=-1></font>
|
|
<p><font size=-1>Combinations:</font>
|
|
<br><font size=-1>Note: things concerning inheritance are pointed out for
|
|
clazz parameter (for example if it is said "non-inherited method" then
|
|
it means that this method is defined in clazz)</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=7 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>obj</font></td>
|
|
|
|
<td><font size=-1>clazz</font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>jmethodID</font></td>
|
|
|
|
<td><font size=-1>args</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
|
|
<td><font size=-1>Number</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some obj</font></td>
|
|
|
|
<td><font size=-1>superclass,</font>
|
|
<br><font size=-1>overriding methods exist in the class of the obj</font></td>
|
|
|
|
<td><font size=-1>CallNonvirtualIntMethod</font></td>
|
|
|
|
<td><font size=-1>ID of <selected> method with signature "(ZBCLSIJFDL<some
|
|
class>;[L<some class>;)I"</font></td>
|
|
|
|
<td><font size=-1>some args</font></td>
|
|
|
|
<td><font size=-1>corresponding result</font></td>
|
|
|
|
<td><font size=-1>12</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some obj</font></td>
|
|
|
|
<td><font size=-1>the class of the object</font></td>
|
|
|
|
<td><font size=-1>CallNonvirtualIntMethod</font></td>
|
|
|
|
<td><font size=-1>ID of the overriding methods in the previous row
|
|
of this table</font></td>
|
|
|
|
<td><font size=-1>some args</font></td>
|
|
|
|
<td><font size=-1>corresponding result</font></td>
|
|
|
|
<td><font size=-1>12</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some obj</font></td>
|
|
|
|
<td><font size=-1>superclass</font></td>
|
|
|
|
<td><font size=-1>CallNonvirtual<type>Method</font>
|
|
<br><font size=-1>CallNonvirtual<type>MethodA</font>
|
|
<br><font size=-1>CallNonvirtual<type>MethodV</font></td>
|
|
|
|
<td><font size=-1>ID of public non-inherited method with signature "(ZBCLSIJFDL<some
|
|
class>;[L<some class>;)?" where ? is run on the all set of possibilities </font></td>
|
|
|
|
<td><font size=-1>Combination 1 and 2</font></td>
|
|
|
|
<td><font size=-1>corresponding result</font></td>
|
|
|
|
<td><font size=-1>66</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some obj</font></td>
|
|
|
|
<td><font size=-1>superclass</font></td>
|
|
|
|
<td><font size=-1>CallNonvirtualIntMethod</font>
|
|
<br><font size=-1>CallNonvirtualIntMethodA</font>
|
|
<br><font size=-1>CallNonvirtualIntMethodV</font></td>
|
|
|
|
<td><font size=-1>ID of public non-inherited method with signature "()I" </font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>corresponding result</font></td>
|
|
|
|
<td><font size=-1>3</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some obj</font></td>
|
|
|
|
<td><font size=-1>superclass</font></td>
|
|
|
|
<td><font size=-1>CallNonvirtualIntMethod</font>
|
|
<br><font size=-1>CallNonvirtualIntMethodA</font>
|
|
<br><font size=-1>CallNonvirtualIntMethodV</font></td>
|
|
|
|
<td><font size=-1>ID of public non-inherited method that throws exception</font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>Exception should be thrown</font></td>
|
|
|
|
<td><font size=-1>3</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Number of test cases: 96</font><font size=-1></font>
|
|
<p><font size=-1>jfieldID GetStaticFieldID(jclass clazz, const char *name,
|
|
const char *sig);</font>
|
|
<br><font size=-1>Combinations (based on next variations):</font>
|
|
<br><b><font size=-1>Field types:</font></b>
|
|
<br><font size=-1>boolean</font>
|
|
<br><font size=-1>byte</font>
|
|
<br><font size=-1>char</font>
|
|
<br><font size=-1>short</font>
|
|
<br><font size=-1>int</font>
|
|
<br><font size=-1>long</font>
|
|
<br><font size=-1>float</font>
|
|
<br><font size=-1>double</font>
|
|
<br><font size=-1>object(non-array)</font>
|
|
<br><font size=-1>array</font><font size=-1></font>
|
|
<p><b><font size=-1>Access modifiers:</font></b>
|
|
<br><font size=-1>public</font>
|
|
<br><font size=-1>protected</font>
|
|
<br><font size=-1>no modifier - package</font>
|
|
<br><font size=-1>private</font><font size=-1></font>
|
|
<p><b><font size=-1>Other modifiers:</font></b>
|
|
<br><font size=-1>no-modifier</font>
|
|
<br><font size=-1>final</font>
|
|
<br><font size=-1>transient</font>
|
|
<br><font size=-1>volatile</font><font size=-1></font>
|
|
<p><b><font size=-1>Inherited from:</font></b>
|
|
<br><font size=-1>not inherited</font>
|
|
<br><font size=-1>superclass</font>
|
|
<br><font size=-1>interface</font><font size=-1></font>
|
|
<p><font size=-1>So the <selected> combinations for static variable
|
|
will be (note: the {other modifiers} will not be combined</font>
|
|
<br><font size=-1>one with another):</font>
|
|
<br><font size=-1>For classes:</font>
|
|
<table BORDER COLS=5 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>Number</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>{Field types}</font></td>
|
|
|
|
<td><font size=-1>public</font></td>
|
|
|
|
<td><font size=-1>no-modifier</font></td>
|
|
|
|
<td><font size=-1>not inherited</font></td>
|
|
|
|
<td><font size=-1>10</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>{int, object}</font></td>
|
|
|
|
<td><font size=-1>{access modifiers}</font></td>
|
|
|
|
<td><font size=-1>no-modifier</font></td>
|
|
|
|
<td><font size=-1>inherited from superclass and not inherited</font></td>
|
|
|
|
<td><font size=-1>16</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>{int, object}</font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>inherited from interface</font></td>
|
|
|
|
<td><font size=-1>2</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>{int, object}</font></td>
|
|
|
|
<td><font size=-1>public</font></td>
|
|
|
|
<td><font size=-1>{other modifiers}</font></td>
|
|
|
|
<td><font size=-1>not inherited</font></td>
|
|
|
|
<td><font size=-1>8</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1>Total: 36 - 4(intersection)=32</font>
|
|
<br><font size=-1>For interfaces will be considered 4 cases: {int, object}
|
|
inherited and not-inherited from superinterface</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=4 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>clazz</font></td>
|
|
|
|
<td><font size=-1>name</font></td>
|
|
|
|
<td><font size=-1>sig</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some class</font></td>
|
|
|
|
<td><font size=-1><selected> existing variable </font></td>
|
|
|
|
<td><font size=-1>appropriate</font></td>
|
|
|
|
<td><font size=-1>field ID, except the cases of private in superclass - </font>
|
|
<br><font size=-1>NULL will be in such cases</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>non-existing </font></td>
|
|
|
|
<td><font size=-1>some sig</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>existing</font></td>
|
|
|
|
<td><font size=-1>some incorrect sig</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>some sig</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>existing</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>some name</font></td>
|
|
|
|
<td><font size=-1>some sig</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Note: to check the correctnesses of received field ID
|
|
the GetStatic<type>Field methods will be used. So it will also be
|
|
the tests on these methods.</font><font size=-1></font>
|
|
<p><font size=-1>Test cases number: 41</font>
|
|
<br><font size=-1></font> <font size=-1></font>
|
|
<p><font size=-1>NativeType GetStatic<type>Field(jclass clazz, jfieldID
|
|
fieldID);</font><font size=-1></font>
|
|
<p><font size=-1>The test cases for these methods are the testcases of
|
|
GetStaticFieldID method where correct field ID should be returned with
|
|
varying on field values. Concerning the "negative" cases: it is fully undefined
|
|
cases.</font><font size=-1></font>
|
|
<p><font size=-1>Test cases number: 70</font><font size=-1></font>
|
|
<p><font size=-1>void SetStatic<type>Field(jclass clazz, jfieldID fieldID,
|
|
NativeType value);</font><font size=-1></font>
|
|
<p><font size=-1>In addition to the possible variations of the variable
|
|
based on its type/modifiers/inheritance the next variations can be used
|
|
for values of</font>
|
|
<br><font size=-1>different types:</font>
|
|
<br><b><font size=-1>Values variations:</font></b>
|
|
<br><font size=-1>jboolean: JNI_TRUE, JNI_FALSE</font>
|
|
<br><font size=-1>jbyte: min, max</font>
|
|
<br><font size=-1>jchar: some of ASCII (only 1st byte is significant),
|
|
some character with 2 significant bytes</font>
|
|
<br><font size=-1>jshort: min, max</font>
|
|
<br><font size=-1>jint: min, max</font>
|
|
<br><font size=-1>jlong: min, max</font>
|
|
<br><font size=-1>jfloat: min, max</font>
|
|
<br><font size=-1>jdouble: min, max</font>
|
|
<br><font size=-1>jobject(non-array): NULL, NON-NULL</font>
|
|
<br><font size=-1>jarray: NULL, NON-NULL</font>
|
|
<br><font size=-1></font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=4 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>obj</font></td>
|
|
|
|
<td><font size=-1>fieldID</font></td>
|
|
|
|
<td><font size=-1>value</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some obj</font></td>
|
|
|
|
<td><font size=-1>valid fieldID for variable from <selected> (where
|
|
it possible, i.e. except the cases of private in superclass ) </font></td>
|
|
|
|
<td><font size=-1>corresponding to variable type from {values
|
|
variations}</font></td>
|
|
|
|
<td><font size=-1>The value will be correctly set, except the cases of
|
|
final (including interface cases).</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Note concerning the "negative" cases with obj and fieldID
|
|
parameters: it is fully undefined cases.</font><font size=-1></font>
|
|
<p><font size=-1>Test cases number: 58</font><font size=-1></font>
|
|
<p><font size=-1>jmethodID GetStaticMethodID(jclass clazz, const char *name,
|
|
const char *sig);</font><font size=-1></font>
|
|
<p><b><font size=-1>Access modifiers:</font></b>
|
|
<br><font size=-1>public</font>
|
|
<br><font size=-1>protected</font>
|
|
<br><font size=-1>no modifier - package</font>
|
|
<br><font size=-1>private</font><font size=-1></font>
|
|
<p><b><font size=-1>Other modifiers:</font></b>
|
|
<br><font size=-1>no-modifier</font>
|
|
<br><font size=-1>final</font>
|
|
<br><font size=-1>synchronized</font>
|
|
<br><font size=-1>native</font><font size=-1></font>
|
|
<p><b><font size=-1>Inherited from:</font></b>
|
|
<br><font size=-1>not inherited</font>
|
|
<br><font size=-1>superclass</font>
|
|
<br><font size=-1></font> <font size=-1></font>
|
|
<p><font size=-1>So the <selected> methods will be:</font>
|
|
<table BORDER COLS=4 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>Number</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>{access modifiers}</font></td>
|
|
|
|
<td><font size=-1>no-modifier</font></td>
|
|
|
|
<td><font size=-1>not inherited and </font>
|
|
<br><font size=-1>inherited from superclass</font></td>
|
|
|
|
<td><font size=-1>8</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>public</font></td>
|
|
|
|
<td><font size=-1>{other modifiers}</font></td>
|
|
|
|
<td><font size=-1>not inherited</font></td>
|
|
|
|
<td><font size=-1>4</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>public</font></td>
|
|
|
|
<td><font size=-1>no-modifier</font></td>
|
|
|
|
<td><font size=-1>override</font></td>
|
|
|
|
<td><font size=-1>1</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1>Total: 12</font><font size=-1></font>
|
|
<p><b><font size=-1>Varying on signatures:</font></b>
|
|
<br><font size=-1>"()V"</font>
|
|
<br><font size=-1>"(ZBCLSIJFDL<some class>;[L<some class>;)V"</font>
|
|
<br><font size=-1>"(ZBCLSIJFDL<some class>;[L<some class>;)I"</font>
|
|
<br><font size=-1>"(ZBCLSIJFDL<some class>;[L<some class>;)L<some
|
|
class>;"</font>
|
|
<br><font size=-1>"(ZBCLSIJFDL<some class>;[L<some class>;)[L<some
|
|
class>;"</font>
|
|
<br><font size=-1>So in <selected> set will be added these varying for
|
|
public non-inherited method.</font>
|
|
<br><font size=-1>Total: +5</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=4 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>clazz</font></td>
|
|
|
|
<td><font size=-1>name</font></td>
|
|
|
|
<td><font size=-1>sig</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some class</font></td>
|
|
|
|
<td><font size=-1>name of the existing method from <selected></font></td>
|
|
|
|
<td><font size=-1>correct signature</font></td>
|
|
|
|
<td><font size=-1>Method ID, except the cases of private in superclass
|
|
- NULL should be returned in these cases</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>name of non-existing method</font></td>
|
|
|
|
<td><font size=-1>some sig</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>name of existing method</font></td>
|
|
|
|
<td><font size=-1>incorrect sig</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>some sig</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>name of existing method</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>some name</font></td>
|
|
|
|
<td><font size=-1>some sig</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1>Test cases number: 22</font><font size=-1></font>
|
|
<p><font size=-1>NativeType CallStatic<type>Method(jclass clazz, jmethodID
|
|
methodID, ...);</font><font size=-1></font>
|
|
<p><font size=-1>NativeType CallStatic<type>MethodA(jclass clazz, jmethodID
|
|
methodID, jvalue *args);</font><font size=-1></font>
|
|
<p><font size=-1>NativeType CallStatic<type>MethodV(jclass clazz, jmethodID
|
|
methodID, va_list args);</font><font size=-1></font>
|
|
<p><font size=-1>Note: The implementation under testing wrapes the nsISecureEnv
|
|
that exports the only one CallStaticMethod which accepts the arguments
|
|
in the form of jvalue* and is used for implementation of all these methods.
|
|
So the <selected> combinations (based on modifiers/inheritance) from
|
|
GetStaticMethodID method will be used only with one method - CallStaticIntMethod.
|
|
The combinations based on varying on values will be used for all 3 set
|
|
of methods.</font>
|
|
<br><b><font size=-1><selected> combinations (based on modifiers/inheritance)</font></b>
|
|
<table BORDER COLS=4 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>Number</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>{access modifiers}</font></td>
|
|
|
|
<td><font size=-1>no-modifier</font></td>
|
|
|
|
<td><font size=-1>not inherited and </font>
|
|
<br><font size=-1>inherited from superclass</font></td>
|
|
|
|
<td><font size=-1>8</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>public</font></td>
|
|
|
|
<td><font size=-1>{other modifiers}</font></td>
|
|
|
|
<td><font size=-1>not inherited</font></td>
|
|
|
|
<td><font size=-1>4</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>public</font></td>
|
|
|
|
<td><font size=-1>no-modifier</font></td>
|
|
|
|
<td><font size=-1>override</font></td>
|
|
|
|
<td><font size=-1>1</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><b><font size=-1>Values variations:</font></b>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=3 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>Combination 1</font></td>
|
|
|
|
<td><font size=-1>Combination 2</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>jboolean</font></td>
|
|
|
|
<td><font size=-1>JNI_TRUE</font></td>
|
|
|
|
<td><font size=-1>JNI_FALSE</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>jbyte</font></td>
|
|
|
|
<td><font size=-1>min</font></td>
|
|
|
|
<td><font size=-1>max</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>jchar</font></td>
|
|
|
|
<td><font size=-1>some of ASCII (only 1st byte is significant)</font></td>
|
|
|
|
<td><font size=-1>some character with 2 significant bytes</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>jshort</font></td>
|
|
|
|
<td><font size=-1>min</font></td>
|
|
|
|
<td><font size=-1>max</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>jint</font></td>
|
|
|
|
<td><font size=-1>min</font></td>
|
|
|
|
<td><font size=-1>max</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>jlong</font></td>
|
|
|
|
<td><font size=-1>min</font></td>
|
|
|
|
<td><font size=-1>max</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>jfloat</font></td>
|
|
|
|
<td><font size=-1>min</font></td>
|
|
|
|
<td><font size=-1>max</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>jdouble</font></td>
|
|
|
|
<td><font size=-1>min</font></td>
|
|
|
|
<td><font size=-1>max</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>jobject(non-array)</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>NON-NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>jarray</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>NON-NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td ALIGN=CENTER COLSPAN="3"><font size=-1>Return values for methods</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1><type> is Boolean</font></td>
|
|
|
|
<td><font size=-1>JNI_TRUE</font></td>
|
|
|
|
<td><font size=-1>JNI_FALSE</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1><type> is Byte</font></td>
|
|
|
|
<td><font size=-1>min</font></td>
|
|
|
|
<td><font size=-1>max</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1><type> is Char</font></td>
|
|
|
|
<td><font size=-1>some of ASCII (only 1st byte is significant)</font></td>
|
|
|
|
<td><font size=-1>some character with 2 significant bytes</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1><type> is Short</font></td>
|
|
|
|
<td><font size=-1>min</font></td>
|
|
|
|
<td><font size=-1>max</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1><type> is Int</font></td>
|
|
|
|
<td><font size=-1>min</font></td>
|
|
|
|
<td><font size=-1>max</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1><type> is Long</font></td>
|
|
|
|
<td><font size=-1>min</font></td>
|
|
|
|
<td><font size=-1>max</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1><type> is Float</font></td>
|
|
|
|
<td><font size=-1>min</font></td>
|
|
|
|
<td><font size=-1>max</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1><type> is Double</font></td>
|
|
|
|
<td><font size=-1>min</font></td>
|
|
|
|
<td><font size=-1>max</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1><type> is Object</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>NON-NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1><type> is Object</font></td>
|
|
|
|
<td><font size=-1>NULL jarray</font></td>
|
|
|
|
<td><font size=-1>NON-NULL jarray</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1><type> is Void</font></td>
|
|
|
|
<td><font size=-1>-</font></td>
|
|
|
|
<td><font size=-1>-</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=6 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>clazz</font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>jmethodID</font></td>
|
|
|
|
<td><font size=-1>args</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
|
|
<td><font size=-1>Number</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some class</font></td>
|
|
|
|
<td><font size=-1>CallStaticIntMethod</font></td>
|
|
|
|
<td><font size=-1>ID of <selected> method with signature "(ZBCLSIJFDL<some
|
|
class>;[L<some class>;)I"</font></td>
|
|
|
|
<td><font size=-1>some args</font></td>
|
|
|
|
<td><font size=-1>corresponding result</font></td>
|
|
|
|
<td><font size=-1>12</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some class</font></td>
|
|
|
|
<td><font size=-1>CallStatic<type>Method</font>
|
|
<br><font size=-1>CallStatic<type>MethodA</font>
|
|
<br><font size=-1>CallStatic<type>MethodV</font></td>
|
|
|
|
<td><font size=-1>ID of public non-inherited method with signature "(ZBCLSIJFDL<some
|
|
class>;[L<some class>;)?" where ? is run on the all set of possibilities </font></td>
|
|
|
|
<td><font size=-1>Combination 1 and 2</font></td>
|
|
|
|
<td><font size=-1>corresponding result</font></td>
|
|
|
|
<td><font size=-1>66</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some class</font></td>
|
|
|
|
<td><font size=-1>CallStaticIntMethod</font>
|
|
<br><font size=-1>CallStaticIntMethodA</font>
|
|
<br><font size=-1>CallStaticIntMethodV</font></td>
|
|
|
|
<td><font size=-1>ID of public non-inherited method with signature "()I" </font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>corresponding result</font></td>
|
|
|
|
<td><font size=-1>3</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some class</font></td>
|
|
|
|
<td><font size=-1>CallStaticIntMethod</font>
|
|
<br><font size=-1>CallStaticIntMethodA</font>
|
|
<br><font size=-1>CallStaticIntMethodV</font></td>
|
|
|
|
<td><font size=-1>ID of public non-inherited method that throws exception</font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>Exception should be thrown</font></td>
|
|
|
|
<td><font size=-1>3</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Number of test cases: 84</font><font size=-1></font>
|
|
<p><font size=-1>jstring NewString(const jchar *unicodeChars, jsize len);</font><font size=-1></font>
|
|
<p><font size=-1>Combinations:</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=3 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>unicodeChars</font></td>
|
|
|
|
<td><font size=-1>len</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>0</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>correct pointer</font></td>
|
|
|
|
<td><font size=-1>0</font></td>
|
|
|
|
<td><font size=-1>empty string</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>correct pointer</font></td>
|
|
|
|
<td><font size=-1>correct length</font></td>
|
|
|
|
<td><font size=-1>correct string</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Number of test cases: 3</font><font size=-1></font>
|
|
<p><font size=-1>jsize GetStringLength(jstring string);</font><font size=-1></font>
|
|
<p><font size=-1>Combinations:</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=2 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>string</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>non-empty string object</font></td>
|
|
|
|
<td><font size=-1>correct length</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>empty string object</font></td>
|
|
|
|
<td><font size=-1>0</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>0</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Number of test cases: 3</font><font size=-1></font>
|
|
<p><font size=-1>const jchar * GetStringChars(jstring string, jboolean
|
|
*isCopy);</font><font size=-1></font>
|
|
<p><font size=-1>Combinations:</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=3 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>string</font></td>
|
|
|
|
<td><font size=-1>isCopy</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>non-empty string object</font></td>
|
|
|
|
<td><font size=-1>NON-NULL</font></td>
|
|
|
|
<td><font size=-1>correct pointer, some value in isCopy</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>empty string object</font></td>
|
|
|
|
<td><font size=-1>NON-NULL</font></td>
|
|
|
|
<td><font size=-1>correct pointer, some value in isCopy</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>NON-NULL</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>non-empty string object</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>correct pointer</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Number of test cases: 4</font><font size=-1></font>
|
|
<p><font size=-1>void ReleaseStringChars(jstring string, const jchar *chars);</font><font size=-1></font>
|
|
<p><font size=-1>Combinations:</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=3 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>string</font></td>
|
|
|
|
<td><font size=-1>chars</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>string object</font></td>
|
|
|
|
<td><font size=-1>correct pointer</font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>?(no crash)</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Number of test cases: 2</font><font size=-1></font>
|
|
<p><font size=-1>jstring NewStringUTF(const char *bytes);</font><font size=-1></font>
|
|
<p><font size=-1>Combinations:</font>
|
|
<table BORDER COLS=2 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>bytes</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>non-empty string</font></td>
|
|
|
|
<td><font size=-1>correct string object</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>empty string</font></td>
|
|
|
|
<td><font size=-1>correct empty string object</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Number of test cases: 3</font><font size=-1></font>
|
|
<p><font size=-1>jsize GetStringUTFLength(jstring string);</font><font size=-1></font>
|
|
<p><font size=-1>Combinations:</font>
|
|
<table BORDER COLS=2 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>string</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>non-empty string</font></td>
|
|
|
|
<td><font size=-1>correct length</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>empty string</font></td>
|
|
|
|
<td><font size=-1>correct length</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>0</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Number of test cases: 3</font><font size=-1></font>
|
|
<p><font size=-1>const char* GetStringUTFChars(jstring string, jboolean
|
|
*isCopy);</font><font size=-1></font>
|
|
<p><font size=-1>Combinations:</font>
|
|
<table BORDER COLS=3 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>string</font></td>
|
|
|
|
<td><font size=-1>isCopy</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>non-empty string object</font></td>
|
|
|
|
<td><font size=-1>NON-NULL</font></td>
|
|
|
|
<td><font size=-1>correct pointer, some value in isCopy</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>empty string object</font></td>
|
|
|
|
<td><font size=-1>NON-NULL</font></td>
|
|
|
|
<td><font size=-1>correct pointer, some value in isCopy</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>NON-NULL</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>non-empty string object</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>correct pointer</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Number of test cases: 4</font><font size=-1></font>
|
|
<p><font size=-1>void ReleaseStringUTFChars(jstring string, const char
|
|
*utf);</font><font size=-1></font>
|
|
<p><font size=-1>Combinations</font>
|
|
<table BORDER COLS=3 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>string</font></td>
|
|
|
|
<td><font size=-1>utf</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>string object</font></td>
|
|
|
|
<td><font size=-1>correct pointer</font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>?(no crash)</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Number of test cases: 2</font><font size=-1></font>
|
|
<p><font size=-1>jsize GetArrayLength(jarray array);</font><font size=-1></font>
|
|
<p><font size=-1>Combinations:</font>
|
|
<table BORDER COLS=2 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>array</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>non-empty array</font></td>
|
|
|
|
<td><font size=-1>length</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>empty</font></td>
|
|
|
|
<td><font size=-1>0</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>0</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Number of test cases: 3</font><font size=-1></font>
|
|
<p><font size=-1>jarray NewObjectArray(jsize length, jclass elementClass,
|
|
jobject initialElement);</font><font size=-1></font>
|
|
<p><font size=-1>Combinations:</font>
|
|
<br><font size=-1></font>
|
|
<table BORDER COLS=4 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>length</font></td>
|
|
|
|
<td><font size=-1>elementClass</font></td>
|
|
|
|
<td><font size=-1>initialElement</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>0</font></td>
|
|
|
|
<td><font size=-1>some class</font></td>
|
|
|
|
<td><font size=-1>some object of class</font></td>
|
|
|
|
<td><font size=-1>empty array</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>> 0 </font></td>
|
|
|
|
<td><font size=-1>some class</font></td>
|
|
|
|
<td><font size=-1>some object of class</font></td>
|
|
|
|
<td><font size=-1>correct array</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>>0</font></td>
|
|
|
|
<td><font size=-1>some class</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>correct array</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1><0</font></td>
|
|
|
|
<td><font size=-1>some class</font></td>
|
|
|
|
<td><font size=-1>some object of class</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>> 0</font></td>
|
|
|
|
<td><font size=-1>some class </font></td>
|
|
|
|
<td><font size=-1>some object of inconsistent class</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>>0</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>some object</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Number of test cases: 6</font><font size=-1></font>
|
|
<p><font size=-1>jobject GetObjectArrayElement(jobjectArray array, jsize
|
|
index);</font><font size=-1></font>
|
|
<p><font size=-1>Combinations:</font>
|
|
<table BORDER COLS=3 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>array</font></td>
|
|
|
|
<td><font size=-1>index</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some array</font></td>
|
|
|
|
<td><font size=-1>inside bounds</font></td>
|
|
|
|
<td><font size=-1>correct element in cases NULL and NON-NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some array</font></td>
|
|
|
|
<td><font size=-1><0 and => length</font></td>
|
|
|
|
<td><font size=-1>ArrayIndexOutOfBoundsException should be thrown</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>some value</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Number of test cases: 5</font><font size=-1></font>
|
|
<p><font size=-1>void SetObjectArrayElement(jobjectArray array, jsize index,
|
|
jobject value);</font><font size=-1></font>
|
|
<p><font size=-1>Combinations:</font>
|
|
<table BORDER COLS=4 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>array</font></td>
|
|
|
|
<td><font size=-1>index</font></td>
|
|
|
|
<td><font size=-1>value</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some array</font></td>
|
|
|
|
<td><font size=-1>inside bounds</font></td>
|
|
|
|
<td><font size=-1>some value of correct class</font></td>
|
|
|
|
<td><font size=-1>element will be set</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some array</font></td>
|
|
|
|
<td><font size=-1>inside bounds</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>element will be set</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some array</font></td>
|
|
|
|
<td><font size=-1><0 and => length</font></td>
|
|
|
|
<td><font size=-1>some value of correct class</font></td>
|
|
|
|
<td><font size=-1>ArrayIndexOutOfBoundsException should be thrown</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some array</font></td>
|
|
|
|
<td><font size=-1>inside bounds</font></td>
|
|
|
|
<td><font size=-1>some value of incorrect class</font></td>
|
|
|
|
<td><font size=-1>ArrayStoreException should be thrown</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Number of test cases: 5</font>
|
|
<br><font size=-1></font> <font size=-1></font>
|
|
<p><font size=-1>ArrayType New<PrimitiveType>Array(jsize length);</font><font size=-1></font>
|
|
<p><font size=-1>Combinations:</font>
|
|
<table BORDER COLS=2 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>length</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1><0</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>0</font></td>
|
|
|
|
<td><font size=-1>0-length array</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>>0 </font></td>
|
|
|
|
<td><font size=-1>correct array</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Number of test cases: 24</font><font size=-1></font>
|
|
<p><font size=-1>NativeType *Get<PrimitiveType>ArrayElements(ArrayType
|
|
array, jboolean *isCopy);</font><font size=-1></font>
|
|
<p><font size=-1>Combinations:</font>
|
|
<table BORDER COLS=3 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>array</font></td>
|
|
|
|
<td><font size=-1>isCopy</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some non-empty array</font></td>
|
|
|
|
<td><font size=-1>NON-NULL</font></td>
|
|
|
|
<td><font size=-1>correct array of native types, isCopy value is set</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some non-empty array</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>correct array of native types</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>NON-NULL</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Number of test cases: 24</font><font size=-1></font>
|
|
<p><font size=-1>void Release<PrimitiveType>ArrayElements(ArrayType
|
|
array, NativeType *elems, jint mode);</font><font size=-1></font>
|
|
<p><font size=-1>Combinations:</font>
|
|
<table BORDER COLS=4 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>array</font></td>
|
|
|
|
<td><font size=-1>elems</font></td>
|
|
|
|
<td><font size=-1>mode</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some array</font></td>
|
|
|
|
<td><font size=-1>correct pointer </font></td>
|
|
|
|
<td><font size=-1>0</font></td>
|
|
|
|
<td><font size=-1>changes reflected, buffer freed</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some array</font></td>
|
|
|
|
<td><font size=-1>correct pointer</font></td>
|
|
|
|
<td><font size=-1>JNI_COMMIT</font></td>
|
|
|
|
<td><font size=-1>changes reflected, buffer isn't freed if was a copy</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some array</font></td>
|
|
|
|
<td><font size=-1>correct pointer</font></td>
|
|
|
|
<td><font size=-1>JNI_ABORT</font></td>
|
|
|
|
<td><font size=-1>only buffer freed if was a copy</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Number of test cases: 24</font><font size=-1></font>
|
|
<p><font size=-1>void Get<PrimitiveType>ArrayRegion(ArrayType array,
|
|
jsize start, jsize len, NativeType *buf);</font><font size=-1></font>
|
|
<p><font size=-1>Combinations:</font>
|
|
<table BORDER COLS=5 WIDTH="88%" >
|
|
<tr>
|
|
<td><font size=-1>array</font></td>
|
|
|
|
<td><font size=-1>start</font></td>
|
|
|
|
<td><font size=-1>len</font></td>
|
|
|
|
<td><font size=-1>buf</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some array</font></td>
|
|
|
|
<td><font size=-1>inside bounds</font></td>
|
|
|
|
<td><font size=-1>start+len inside bounds</font></td>
|
|
|
|
<td><font size=-1>correct</font></td>
|
|
|
|
<td><font size=-1>correct elements are copied</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some array of Int type</font></td>
|
|
|
|
<td><font size=-1><0 or start+len=>length</font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>correct</font></td>
|
|
|
|
<td><font size=-1>ArrayIndexOutOfBoundsException should be thrown</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL for Int method</font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>nothing should be copied</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some array of Int type</font></td>
|
|
|
|
<td><font size=-1>inside bounds</font></td>
|
|
|
|
<td><font size=-1>start+len inside bounds</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>nothing should be copied</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Number of test cases: 8+3=10</font><font size=-1></font>
|
|
<p><font size=-1>void Set<PrimitiveType>ArrayRegion(ArrayType array,
|
|
jsize start, jsize len, NativeType *buf);</font><font size=-1></font>
|
|
<p><font size=-1>Combinations:</font>
|
|
<table BORDER COLS=5 WIDTH="88%" >
|
|
<tr>
|
|
<td><font size=-1>array</font></td>
|
|
|
|
<td><font size=-1>start</font></td>
|
|
|
|
<td><font size=-1>len</font></td>
|
|
|
|
<td><font size=-1>buf</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some array</font></td>
|
|
|
|
<td><font size=-1>inside bounds</font></td>
|
|
|
|
<td><font size=-1>start+len inside bounds</font></td>
|
|
|
|
<td><font size=-1>correct</font></td>
|
|
|
|
<td><font size=-1>correct elements are copied</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some array of Int type</font></td>
|
|
|
|
<td><font size=-1><0 or start+len=>length</font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>correct</font></td>
|
|
|
|
<td><font size=-1>ArrayIndexOutOfBoundsException should be thrown</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL for Int method</font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1></font></td>
|
|
|
|
<td><font size=-1>nothing should be copied</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some array of Int type</font></td>
|
|
|
|
<td><font size=-1>inside bounds</font></td>
|
|
|
|
<td><font size=-1>start+len inside bounds</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>nothing should be copied</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Number of test cases: 8+3=10</font><font size=-1></font>
|
|
<p><font size=-1>jint RegisterNatives(jclass clazz, const JNINativeMethod
|
|
*methods, jint nMethods);</font><font size=-1></font>
|
|
<p><font size=-1>Combinations:</font>
|
|
<table BORDER COLS=4 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>clazz</font></td>
|
|
|
|
<td><font size=-1>methods</font></td>
|
|
|
|
<td><font size=-1>nMethods</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some class</font></td>
|
|
|
|
<td><font size=-1>2-3 correct method structures</font></td>
|
|
|
|
<td><font size=-1>correct</font></td>
|
|
|
|
<td><font size=-1>0, methods should be bound</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some class</font></td>
|
|
|
|
<td><font size=-1>incorrect method structure:</font>
|
|
<br><font size=-1>unexistent name,</font>
|
|
<br><font size=-1>incorrect signature</font></td>
|
|
|
|
<td><font size=-1>correct</font></td>
|
|
|
|
<td><font size=-1>negative value, NoSuchMethodError should be thrown</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>some class</font></td>
|
|
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>0</font></td>
|
|
|
|
<td><font size=-1>?(0, nothing to bound)</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Number of test cases: 4</font><font size=-1></font>
|
|
<p><font size=-1>jint UnregisterNatives(jclass clazz);</font><font size=-1></font>
|
|
<p><font size=-1>Combinations:</font>
|
|
<table BORDER COLS=2 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>clazz</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>class with native methods</font></td>
|
|
|
|
<td><font size=-1>0, methods shoud be unbound</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>class w/o native methods</font></td>
|
|
|
|
<td><font size=-1>?(0, nothing to unbound)</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>?(0, nothing to unbound)</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Number of test cases: 3</font><font size=-1></font>
|
|
<p><font size=-1>jint MonitorEnter(jobject obj);</font><font size=-1></font>
|
|
<p><font size=-1>Combinations:</font>
|
|
<table BORDER COLS=2 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>object</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NON-NULL, one thread takes and repeats</font></td>
|
|
|
|
<td><font size=-1>0, should be owned by thread</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NON_NULL, 2 threads</font></td>
|
|
|
|
<td><font size=-1>one owns, second doesn't</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>negative value</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Number of test cases: 3</font><font size=-1></font>
|
|
<p><font size=-1>jint MonitorExit(jobject obj);</font><font size=-1></font>
|
|
<p><font size=-1>Combinations:</font>
|
|
<table BORDER COLS=2 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>object</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NON_NULL, thread owns the monitor</font></td>
|
|
|
|
<td><font size=-1>0 returned, second thread can get the monitor </font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NON_NULL, thread doesn't own the monitor</font></td>
|
|
|
|
<td><font size=-1>negative value</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>negative value</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Number of test cases: 3</font><font size=-1></font>
|
|
<p><font size=-1>jint GetJavaVM(JavaVM **vm);</font><font size=-1></font>
|
|
<p><font size=-1>Combinations:</font>
|
|
<table BORDER COLS=2 WIDTH="100%" >
|
|
<tr>
|
|
<td><font size=-1>vm</font></td>
|
|
|
|
<td><font size=-1>Expected result</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NON-NULL</font></td>
|
|
|
|
<td><font size=-1>0, pointer should be placed</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font size=-1>NULL</font></td>
|
|
|
|
<td><font size=-1>negative value</font></td>
|
|
</tr>
|
|
</table>
|
|
<font size=-1></font>
|
|
<p><font size=-1>Number of test cases: 2</font><font size=-1></font>
|
|
<p><b><font size=-1>Grand total: 877.</font></b>
|
|
<br>
|
|
</body>
|
|
</html>
|