mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-28 01:25:41 +08:00
1808372b58
* libjava.jni/cxxtest.out: New file. * libjava.jni/cxxtest.cc: New file. * libjava.jni/cxxtest.java: New file. * libjava.jni/jni.exp (gcj_jni_test_one): If there is no .c file, assume there is a .cc file. From-SVN: r48012
26 lines
386 B
Java
26 lines
386 B
Java
// Test for array field lookup.
|
|
|
|
public class cxxtest
|
|
{
|
|
// A field for us to look up.
|
|
public Object[] F = new Object[7];
|
|
|
|
public native Object[] fetch ();
|
|
|
|
public void doit ()
|
|
{
|
|
System.out.println (F == fetch ());
|
|
}
|
|
|
|
public static void main (String[] args)
|
|
{
|
|
cxxtest q = new cxxtest ();
|
|
q.doit ();
|
|
}
|
|
|
|
static
|
|
{
|
|
System.loadLibrary ("cxxtest");
|
|
}
|
|
}
|