noclass.c: New file.
* libjava.jni/noclass.c: New file. * libjava.jni/noclass.out: New file. * libjava.jni/noclass.java: New file. From-SVN: r32226
This commit is contained in:
parent
fed3cef0db
commit
a51c1a1a0a
@ -1,3 +1,9 @@
|
||||
2000-02-23 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* libjava.jni/noclass.c: New file.
|
||||
* libjava.jni/noclass.out: New file.
|
||||
* libjava.jni/noclass.java: New file.
|
||||
|
||||
2000-02-18 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* libjava.jni/register.java: New file.
|
||||
|
9
libjava/testsuite/libjava.jni/noclass.c
Normal file
9
libjava/testsuite/libjava.jni/noclass.c
Normal file
@ -0,0 +1,9 @@
|
||||
#include <noclass.h>
|
||||
|
||||
void
|
||||
Java_noclass_find_1it (JNIEnv *env, jclass k)
|
||||
{
|
||||
/* We cause an exception by asking for a class we know does not
|
||||
exist. */
|
||||
k = (*env)->FindClass (env, "java/lang/Sarcophagus");
|
||||
}
|
18
libjava/testsuite/libjava.jni/noclass.java
Normal file
18
libjava/testsuite/libjava.jni/noclass.java
Normal file
@ -0,0 +1,18 @@
|
||||
// Test to make sure JNI implementation catches exceptions.
|
||||
|
||||
public class noclass
|
||||
{
|
||||
static
|
||||
{
|
||||
System.loadLibrary ("noclass");
|
||||
}
|
||||
|
||||
public static native void find_it ();
|
||||
|
||||
public static void main (String[] args)
|
||||
{
|
||||
find_it ();
|
||||
// If find_it() causes a crash, we won't be running this next line.
|
||||
System.out.println ("Ok");
|
||||
}
|
||||
}
|
1
libjava/testsuite/libjava.jni/noclass.out
Normal file
1
libjava/testsuite/libjava.jni/noclass.out
Normal file
@ -0,0 +1 @@
|
||||
Ok
|
Loading…
Reference in New Issue
Block a user