diff options
author | Andrew Haley <aph@redhat.com> | 2016-09-30 16:24:48 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2016-09-30 16:24:48 +0000 |
commit | 07b78716af6a9d7c9fd1e94d9baf94a52c873947 (patch) | |
tree | 3f22b3241c513ad168c8353805614ae1249410f4 /libjava/testsuite/libjava.jni | |
parent | eae993948bae8b788c53772bcb9217c063716f93 (diff) | |
download | gcc-07b78716af6a9d7c9fd1e94d9baf94a52c873947.tar.gz |
Makefile.def: Remove libjava.
2016-09-30 Andrew Haley <aph@redhat.com>
* Makefile.def: Remove libjava.
* Makefile.tpl: Likewise.
* Makefile.in: Regenerate.
* configure.ac: Likewise.
* configure: Likewise.
* gcc/java: Remove.
* libjava: Likewise.
From-SVN: r240662
Diffstat (limited to 'libjava/testsuite/libjava.jni')
144 files changed, 0 insertions, 2395 deletions
diff --git a/libjava/testsuite/libjava.jni/PR15133.c b/libjava/testsuite/libjava.jni/PR15133.c deleted file mode 100644 index be5a48efa3b..00000000000 --- a/libjava/testsuite/libjava.jni/PR15133.c +++ /dev/null @@ -1,9 +0,0 @@ -#include <stdio.h> -#include <jni.h> -#include "PR15133.h" - -JNIEXPORT void JNICALL -Java_PR15133_printIt (JNIEnv *env, jobject x, jint y) -{ - printf ("%d\n", y); -} diff --git a/libjava/testsuite/libjava.jni/PR15133.h b/libjava/testsuite/libjava.jni/PR15133.h deleted file mode 100644 index af9f8f8a368..00000000000 --- a/libjava/testsuite/libjava.jni/PR15133.h +++ /dev/null @@ -1,19 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#include <jni.h> - -#ifndef __PR15133__ -#define __PR15133__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -JNIEXPORT void JNICALL Java_PR15133_printIt (JNIEnv *env, jobject, jint); - -#ifdef __cplusplus -} -#endif - -#endif /* __PR15133__ */ diff --git a/libjava/testsuite/libjava.jni/PR15133.jar b/libjava/testsuite/libjava.jni/PR15133.jar Binary files differdeleted file mode 100644 index ad76705df4d..00000000000 --- a/libjava/testsuite/libjava.jni/PR15133.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/PR15133.java b/libjava/testsuite/libjava.jni/PR15133.java deleted file mode 100644 index 90435765b3d..00000000000 --- a/libjava/testsuite/libjava.jni/PR15133.java +++ /dev/null @@ -1,14 +0,0 @@ -/* Test case for PR java/15133 */ -public class PR15133 -{ - public void printIt (String dummy) { } - - public native void printIt (int num); - - public static void main (String[] args) - { - System.loadLibrary ("PR15133"); - - new PR15133( ).printIt( 1729); - } -} diff --git a/libjava/testsuite/libjava.jni/PR15133.out b/libjava/testsuite/libjava.jni/PR15133.out deleted file mode 100644 index 32bb421c624..00000000000 --- a/libjava/testsuite/libjava.jni/PR15133.out +++ /dev/null @@ -1 +0,0 @@ -1729 diff --git a/libjava/testsuite/libjava.jni/PR18116.c b/libjava/testsuite/libjava.jni/PR18116.c deleted file mode 100644 index bcd14331e61..00000000000 --- a/libjava/testsuite/libjava.jni/PR18116.c +++ /dev/null @@ -1,35 +0,0 @@ -#include <stdlib.h> -#include <assert.h> -#include <PR18116.h> - -// The purpose of this test is to ensure that signatures with non-top -// level class arguments work. - -static jint -some_random_name (JNIEnv *env, jclass k, jobject v) -{ - return 555; -} - -JNIEXPORT jint JNICALL -JNI_OnLoad (JavaVM *vm, void *nothing) -{ - JNIEnv *env; - JNINativeMethod meth; - jclass k; - jint r; - - r = (*vm)->GetEnv (vm, (void **) &env, JNI_VERSION_1_2); - assert (r == JNI_OK); - k = (*env)->FindClass (env, "PR18116"); - assert (k != NULL); - - meth.name = "doit"; - meth.signature = "(Ljava/lang/String;)I"; - meth.fnPtr = some_random_name; - - r = (*env)->RegisterNatives (env, k, &meth, 1); - assert (r == JNI_OK); - - return JNI_VERSION_1_2; -} diff --git a/libjava/testsuite/libjava.jni/PR18116.h b/libjava/testsuite/libjava.jni/PR18116.h deleted file mode 100644 index 56fc648be0a..00000000000 --- a/libjava/testsuite/libjava.jni/PR18116.h +++ /dev/null @@ -1,19 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#include <jni.h> - -#ifndef __PR18116__ -#define __PR18116__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -JNIEXPORT jint JNICALL Java_PR18116_doit (JNIEnv *env, jclass, jstring); - -#ifdef __cplusplus -} -#endif - -#endif /* __PR18116__ */ diff --git a/libjava/testsuite/libjava.jni/PR18116.jar b/libjava/testsuite/libjava.jni/PR18116.jar Binary files differdeleted file mode 100644 index b9a0034bac3..00000000000 --- a/libjava/testsuite/libjava.jni/PR18116.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/PR18116.java b/libjava/testsuite/libjava.jni/PR18116.java deleted file mode 100644 index d582132b677..00000000000 --- a/libjava/testsuite/libjava.jni/PR18116.java +++ /dev/null @@ -1,16 +0,0 @@ -// PR18116.java - Test RegisterNatives with more complex signatures. - -public class PR18116 -{ - static - { - System.loadLibrary ("PR18116"); - } - - public static native int doit (java.lang.String s); - - public static void main (String[] args) - { - System.out.println (doit ("Hello World!")); - } -} diff --git a/libjava/testsuite/libjava.jni/PR18116.out b/libjava/testsuite/libjava.jni/PR18116.out deleted file mode 100644 index 3749383ded2..00000000000 --- a/libjava/testsuite/libjava.jni/PR18116.out +++ /dev/null @@ -1 +0,0 @@ -555 diff --git a/libjava/testsuite/libjava.jni/PR28178.c b/libjava/testsuite/libjava.jni/PR28178.c deleted file mode 100644 index 17e730a1c36..00000000000 --- a/libjava/testsuite/libjava.jni/PR28178.c +++ /dev/null @@ -1,10 +0,0 @@ -#include <PR28178.h> - -void -Java_PR28178_m (JNIEnv *env, jclass ignore) -{ - (*env)->DeleteLocalRef(env, NULL); - (*env)->DeleteGlobalRef(env, NULL); -} - - diff --git a/libjava/testsuite/libjava.jni/PR28178.h b/libjava/testsuite/libjava.jni/PR28178.h deleted file mode 100644 index e686439ecf5..00000000000 --- a/libjava/testsuite/libjava.jni/PR28178.h +++ /dev/null @@ -1,19 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#include <jni.h> - -#ifndef __PR28178__ -#define __PR28178__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -JNIEXPORT void JNICALL Java_PR28178_m (JNIEnv *env, jclass); - -#ifdef __cplusplus -} -#endif - -#endif /* __PR28178__ */ diff --git a/libjava/testsuite/libjava.jni/PR28178.jar b/libjava/testsuite/libjava.jni/PR28178.jar Binary files differdeleted file mode 100644 index 0c9082bb906..00000000000 --- a/libjava/testsuite/libjava.jni/PR28178.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/PR28178.java b/libjava/testsuite/libjava.jni/PR28178.java deleted file mode 100644 index f8d7b904ccd..00000000000 --- a/libjava/testsuite/libjava.jni/PR28178.java +++ /dev/null @@ -1,15 +0,0 @@ -// Regression test for PR 28178. - -public class PR28178 -{ - static { - System.loadLibrary("PR28178"); - } - - public static native void m(); - - public static void main(String[] args) - { - m(); - } -} diff --git a/libjava/testsuite/libjava.jni/PR28178.out b/libjava/testsuite/libjava.jni/PR28178.out deleted file mode 100644 index e69de29bb2d..00000000000 --- a/libjava/testsuite/libjava.jni/PR28178.out +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/bytebuffer.c b/libjava/testsuite/libjava.jni/bytebuffer.c deleted file mode 100644 index 146c6a8443e..00000000000 --- a/libjava/testsuite/libjava.jni/bytebuffer.c +++ /dev/null @@ -1,62 +0,0 @@ -#include "bytebuffer.h" - -static void -test_buffer (JNIEnv *env, jobject buffer, const char *name) -{ - void *tmp = (*env)->GetDirectBufferAddress (env, buffer); - - if (tmp == NULL) - printf ("PASS: address of %s\n", name); - else - printf ("FAIL: address of %s\n", name); - - int tmplen = (*env)->GetDirectBufferCapacity (env, buffer); - - if (tmplen == -1) - printf ("PASS: length of %s\n", name); - else - printf ("FAIL: length of %s\n", name); -} - -JNIEXPORT void JNICALL -Java_bytebuffer_testByteBuffer (JNIEnv *env, jclass k, jobject buffer) -{ - test_buffer (env, buffer, "java.nio.ByteBuffer"); -} - -JNIEXPORT void JNICALL -Java_bytebuffer_testCharBuffer (JNIEnv *env, jclass k, jobject buffer) -{ - test_buffer (env, buffer, "java.nio.CharBuffer"); -} - -JNIEXPORT void JNICALL -Java_bytebuffer_testDoubleBuffer (JNIEnv *env, jclass k, jobject buffer) -{ - test_buffer (env, buffer, "java.nio.DoubleBuffer"); -} - -JNIEXPORT void JNICALL -Java_bytebuffer_testFloatBuffer (JNIEnv *env, jclass k, jobject buffer) -{ - test_buffer (env, buffer, "java.nio.FloatBuffer"); -} - -JNIEXPORT void JNICALL -Java_bytebuffer_testIntBuffer (JNIEnv *env, jclass k, jobject buffer) -{ - test_buffer (env, buffer, "java.nio.IntBuffer"); -} - -JNIEXPORT void JNICALL -Java_bytebuffer_testLongBuffer (JNIEnv *env, jclass k, jobject buffer) -{ - test_buffer (env, buffer, "java.nio.LongBuffer"); -} - -JNIEXPORT void JNICALL -Java_bytebuffer_testShortBuffer (JNIEnv *env, jclass k, jobject buffer) -{ - test_buffer (env, buffer, "java.nio.ShortBuffer"); -} - diff --git a/libjava/testsuite/libjava.jni/bytebuffer.h b/libjava/testsuite/libjava.jni/bytebuffer.h deleted file mode 100644 index 33b5c3aa061..00000000000 --- a/libjava/testsuite/libjava.jni/bytebuffer.h +++ /dev/null @@ -1,25 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#include <jni.h> - -#ifndef __bytebuffer__ -#define __bytebuffer__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -JNIEXPORT void JNICALL Java_bytebuffer_testByteBuffer (JNIEnv *env, jclass, jobject); -JNIEXPORT void JNICALL Java_bytebuffer_testCharBuffer (JNIEnv *env, jclass, jobject); -JNIEXPORT void JNICALL Java_bytebuffer_testDoubleBuffer (JNIEnv *env, jclass, jobject); -JNIEXPORT void JNICALL Java_bytebuffer_testFloatBuffer (JNIEnv *env, jclass, jobject); -JNIEXPORT void JNICALL Java_bytebuffer_testIntBuffer (JNIEnv *env, jclass, jobject); -JNIEXPORT void JNICALL Java_bytebuffer_testLongBuffer (JNIEnv *env, jclass, jobject); -JNIEXPORT void JNICALL Java_bytebuffer_testShortBuffer (JNIEnv *env, jclass, jobject); - -#ifdef __cplusplus -} -#endif - -#endif /* __bytebuffer__ */ diff --git a/libjava/testsuite/libjava.jni/bytebuffer.jar b/libjava/testsuite/libjava.jni/bytebuffer.jar Binary files differdeleted file mode 100644 index d0ca6d7e923..00000000000 --- a/libjava/testsuite/libjava.jni/bytebuffer.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/bytebuffer.java b/libjava/testsuite/libjava.jni/bytebuffer.java deleted file mode 100644 index 0e541123f55..00000000000 --- a/libjava/testsuite/libjava.jni/bytebuffer.java +++ /dev/null @@ -1,38 +0,0 @@ -// Test to make sure JNI implementation catches exceptions. - -import java.nio.*; - -public class bytebuffer -{ - static - { - System.loadLibrary("bytebuffer"); - } - - public static native void testByteBuffer(ByteBuffer bb); - public static native void testCharBuffer(CharBuffer b); - public static native void testDoubleBuffer(DoubleBuffer b); - public static native void testFloatBuffer(FloatBuffer b); - public static native void testIntBuffer(IntBuffer b); - public static native void testLongBuffer(LongBuffer b); - public static native void testShortBuffer(ShortBuffer b); - - public static void main(String[] args) - { - ByteBuffer bb = ByteBuffer.allocate(1024); - testByteBuffer(bb); - testCharBuffer(bb.asCharBuffer()); - testDoubleBuffer(bb.asDoubleBuffer()); - testFloatBuffer(bb.asFloatBuffer()); - testIntBuffer(bb.asIntBuffer()); - testLongBuffer(bb.asLongBuffer()); - testShortBuffer(bb.asShortBuffer()); - - testCharBuffer(CharBuffer.allocate(1024)); - testDoubleBuffer(DoubleBuffer.allocate(1024)); - testFloatBuffer(FloatBuffer.allocate(1024)); - testIntBuffer(IntBuffer.allocate(1024)); - testLongBuffer(LongBuffer.allocate(1024)); - testShortBuffer(ShortBuffer.allocate(1024)); - } -} diff --git a/libjava/testsuite/libjava.jni/bytebuffer.out b/libjava/testsuite/libjava.jni/bytebuffer.out deleted file mode 100644 index 5af92e20612..00000000000 --- a/libjava/testsuite/libjava.jni/bytebuffer.out +++ /dev/null @@ -1,26 +0,0 @@ -PASS: address of java.nio.ByteBuffer -PASS: length of java.nio.ByteBuffer -PASS: address of java.nio.CharBuffer -PASS: length of java.nio.CharBuffer -PASS: address of java.nio.DoubleBuffer -PASS: length of java.nio.DoubleBuffer -PASS: address of java.nio.FloatBuffer -PASS: length of java.nio.FloatBuffer -PASS: address of java.nio.IntBuffer -PASS: length of java.nio.IntBuffer -PASS: address of java.nio.LongBuffer -PASS: length of java.nio.LongBuffer -PASS: address of java.nio.ShortBuffer -PASS: length of java.nio.ShortBuffer -PASS: address of java.nio.CharBuffer -PASS: length of java.nio.CharBuffer -PASS: address of java.nio.DoubleBuffer -PASS: length of java.nio.DoubleBuffer -PASS: address of java.nio.FloatBuffer -PASS: length of java.nio.FloatBuffer -PASS: address of java.nio.IntBuffer -PASS: length of java.nio.IntBuffer -PASS: address of java.nio.LongBuffer -PASS: length of java.nio.LongBuffer -PASS: address of java.nio.ShortBuffer -PASS: length of java.nio.ShortBuffer diff --git a/libjava/testsuite/libjava.jni/calls.c b/libjava/testsuite/libjava.jni/calls.c deleted file mode 100644 index 709e55d13ba..00000000000 --- a/libjava/testsuite/libjava.jni/calls.c +++ /dev/null @@ -1,75 +0,0 @@ -#include <stdio.h> -#include <calls.h> - -JNIEXPORT jint JNICALL -Java_calls_docall (JNIEnv *env, jobject _this) -{ - jmethodID method; - jclass klass, super; - - jbyte b; - jshort s; - jchar c; - jint i; - jlong l; - jfloat f; - jdouble d; - - jvalue val; - - jint fails = 0; - - klass = (*env)->GetObjectClass (env, _this); - super = (*env)->GetSuperclass (env, klass); - - method = (*env)->GetMethodID (env, klass, "byte_f", "()B"); - b = (*env)->CallByteMethod (env, _this, method); - if (b != 23) - ++fails; - - method = (*env)->GetMethodID (env, klass, "char_f", "(I)C"); - val.i = 10; - c = (*env)->CallCharMethodA (env, _this, method, &val); - if (c != ('a' + 10)) - ++fails; - - method = (*env)->GetMethodID (env, super, "int_f", "()I"); - i = (*env)->CallNonvirtualIntMethod (env, _this, super, method); - if (i != 27) - ++fails; - - i = (*env)->CallIntMethod (env, _this, method); - if (i != 1023) - ++fails; - - method = (*env)->GetStaticMethodID (env, klass, "long_f", "(J)J"); - l = (*env)->CallStaticLongMethod (env, klass, method, (jlong) 10); - if (l != 2033) - ++fails; - - method = (*env)->GetStaticMethodID (env, klass, "longpb_f", "(BJBJBJ)J"); - l = (*env)->CallStaticLongMethod (env, klass, method, (jbyte) 13, (jlong) 3, - (jbyte) 13, (jlong) 3, (jbyte) 13, (jlong) 4); - if (l != 3033) - ++fails; - - method = (*env)->GetMethodID (env, klass, "void_f", "()V"); - (*env)->CallVoidMethod (env, _this, method); - - method = (*env)->GetStaticMethodID (env, klass, "short_f", "()S"); - s = (*env)->CallStaticShortMethod (env, klass, method); - if (s != 2) - ++fails; - - method = (*env)->GetMethodID (env, klass, "double_f", "()D"); - d = (*env)->CallDoubleMethod (env, _this, method); - if (d != -1.0) - ++fails; - - method = (*env)->GetMethodID (env, klass, "float_f", "()F"); - f = (*env)->CallFloatMethod (env, _this, method); - if (f != 1.0) - ++fails; - - return fails; -} diff --git a/libjava/testsuite/libjava.jni/calls.h b/libjava/testsuite/libjava.jni/calls.h deleted file mode 100644 index 64b967095b7..00000000000 --- a/libjava/testsuite/libjava.jni/calls.h +++ /dev/null @@ -1,19 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#include <jni.h> - -#ifndef __calls__ -#define __calls__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -JNIEXPORT jint JNICALL Java_calls_docall (JNIEnv *env, jobject); - -#ifdef __cplusplus -} -#endif - -#endif /* __calls__ */ diff --git a/libjava/testsuite/libjava.jni/calls.jar b/libjava/testsuite/libjava.jni/calls.jar Binary files differdeleted file mode 100644 index 3a188ea4907..00000000000 --- a/libjava/testsuite/libjava.jni/calls.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/calls.java b/libjava/testsuite/libjava.jni/calls.java deleted file mode 100644 index 19c33be2a83..00000000000 --- a/libjava/testsuite/libjava.jni/calls.java +++ /dev/null @@ -1,72 +0,0 @@ -// Test a bunch of different calls. - -class base -{ - public int int_f () - { - return 27; - } -} - -public class calls extends base -{ - static - { - System.loadLibrary ("calls"); - } - - public native int docall (); - - public byte byte_f () - { - return 23; - } - - public char char_f (int z) - { - return (char) ('a' + z); - } - - public int int_f () - { - return 1023; - } - - public static long long_f (long q) - { - return q + 2023; - } - - public static long longpb_f (byte b1, long q1, byte b2, long q2, - byte b3, long q3) - { - return q1 + q2 + q3 + 3023; - } - - public void void_f () - { - System.out.println ("void"); - } - - public static short short_f () - { - return 2; - } - - public double double_f () - { - return -1.0; - } - - public float float_f () - { - return (float) 1.0; - } - - public static void main (String[] args) - { - calls c = new calls (); - if (c.docall () != 0) - System.out.println ("fail"); - } -} diff --git a/libjava/testsuite/libjava.jni/calls.out b/libjava/testsuite/libjava.jni/calls.out deleted file mode 100644 index cbab1f6b63a..00000000000 --- a/libjava/testsuite/libjava.jni/calls.out +++ /dev/null @@ -1 +0,0 @@ -void diff --git a/libjava/testsuite/libjava.jni/cxxtest.cc b/libjava/testsuite/libjava.jni/cxxtest.cc deleted file mode 100644 index 577273bb5a2..00000000000 --- a/libjava/testsuite/libjava.jni/cxxtest.cc +++ /dev/null @@ -1,24 +0,0 @@ -#include <jni.h> -#include <cxxtest.h> - -jobjectArray -Java_cxxtest_fetch (JNIEnv *env, jobject _this) -{ - jclass cls; - jfieldID fid; - jobjectArray obj; - - cls = env->GetObjectClass (_this); - if (! cls) - return 0; - - fid = env->GetFieldID (cls, "F", "[Ljava/lang/Object;"); - if (! fid) - return 0; - - obj = reinterpret_cast<jobjectArray> (env->GetObjectField (_this, fid)); - - return obj; -} - - diff --git a/libjava/testsuite/libjava.jni/cxxtest.h b/libjava/testsuite/libjava.jni/cxxtest.h deleted file mode 100644 index d903636f4e4..00000000000 --- a/libjava/testsuite/libjava.jni/cxxtest.h +++ /dev/null @@ -1,19 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#include <jni.h> - -#ifndef __cxxtest__ -#define __cxxtest__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -JNIEXPORT jobjectArray JNICALL Java_cxxtest_fetch (JNIEnv *env, jobject); - -#ifdef __cplusplus -} -#endif - -#endif /* __cxxtest__ */ diff --git a/libjava/testsuite/libjava.jni/cxxtest.jar b/libjava/testsuite/libjava.jni/cxxtest.jar Binary files differdeleted file mode 100644 index 5a9a0d77217..00000000000 --- a/libjava/testsuite/libjava.jni/cxxtest.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/cxxtest.java b/libjava/testsuite/libjava.jni/cxxtest.java deleted file mode 100644 index b1c3bb945fa..00000000000 --- a/libjava/testsuite/libjava.jni/cxxtest.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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"); - } -} diff --git a/libjava/testsuite/libjava.jni/cxxtest.out b/libjava/testsuite/libjava.jni/cxxtest.out deleted file mode 100644 index 27ba77ddaf6..00000000000 --- a/libjava/testsuite/libjava.jni/cxxtest.out +++ /dev/null @@ -1 +0,0 @@ -true diff --git a/libjava/testsuite/libjava.jni/directbuffer.c b/libjava/testsuite/libjava.jni/directbuffer.c deleted file mode 100644 index 3d32aba01fb..00000000000 --- a/libjava/testsuite/libjava.jni/directbuffer.c +++ /dev/null @@ -1,75 +0,0 @@ -#include <stdlib.h> - -#include "directbuffer.h" - -#define BUFFER_SIZE 1024 - -static void *address; - -JNIEXPORT jobject JNICALL -Java_directbuffer_createDirectByteBuffer (JNIEnv *env, jclass k) -{ - address = malloc (BUFFER_SIZE); - return (*env)->NewDirectByteBuffer (env, address, 1024); -} - -static void -test_buffer (JNIEnv *env, jobject buffer, const char *name, int len) -{ - void *tmp = (*env)->GetDirectBufferAddress (env, buffer); - - if (address == tmp) - printf ("PASS: address of %s\n", name); - else - printf ("FAIL: address of %s\n", name); - - int tmplen = (*env)->GetDirectBufferCapacity (env, buffer); - - if (len == tmplen) - printf ("PASS: length of %s\n", name); - else - printf ("FAIL: length of %s\n", name); -} - -JNIEXPORT void JNICALL -Java_directbuffer_testDirectByteBuffer (JNIEnv *env, jclass k, jobject buffer, jint len) -{ - test_buffer (env, buffer, "direct java.nio.ByteBuffer", len); -} - -JNIEXPORT void JNICALL -Java_directbuffer_testCharBuffer (JNIEnv *env, jclass k, jobject buffer, jint len) -{ - test_buffer (env, buffer, "java.nio.CharBuffer view", len); -} - -JNIEXPORT void JNICALL -Java_directbuffer_testDoubleBuffer (JNIEnv *env, jclass k, jobject buffer, jint len) -{ - test_buffer (env, buffer, "java.nio.DoubleBuffer view", len); -} - -JNIEXPORT void JNICALL -Java_directbuffer_testFloatBuffer (JNIEnv *env, jclass k, jobject buffer, jint len) -{ - test_buffer (env, buffer, "java.nio.FloatBuffer view", len); -} - -JNIEXPORT void JNICALL -Java_directbuffer_testIntBuffer (JNIEnv *env, jclass k, jobject buffer, jint len) -{ - test_buffer (env, buffer, "java.nio.IntBuffer view", len); -} - -JNIEXPORT void JNICALL -Java_directbuffer_testLongBuffer (JNIEnv *env, jclass k, jobject buffer, jint len) -{ - test_buffer (env, buffer, "java.nio.LongBuffer view", len); -} - -JNIEXPORT void JNICALL -Java_directbuffer_testShortBuffer (JNIEnv *env, jclass k, jobject buffer, jint len) -{ - test_buffer (env, buffer, "java.nio.ShortBuffer view", len); -} - diff --git a/libjava/testsuite/libjava.jni/directbuffer.h b/libjava/testsuite/libjava.jni/directbuffer.h deleted file mode 100644 index 6d5c652760b..00000000000 --- a/libjava/testsuite/libjava.jni/directbuffer.h +++ /dev/null @@ -1,26 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#include <jni.h> - -#ifndef __directbuffer__ -#define __directbuffer__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -JNIEXPORT jobject JNICALL Java_directbuffer_createDirectByteBuffer (JNIEnv *env, jclass); -JNIEXPORT void JNICALL Java_directbuffer_testDirectByteBuffer (JNIEnv *env, jclass, jobject, jint); -JNIEXPORT void JNICALL Java_directbuffer_testCharBuffer (JNIEnv *env, jclass, jobject, jint); -JNIEXPORT void JNICALL Java_directbuffer_testDoubleBuffer (JNIEnv *env, jclass, jobject, jint); -JNIEXPORT void JNICALL Java_directbuffer_testFloatBuffer (JNIEnv *env, jclass, jobject, jint); -JNIEXPORT void JNICALL Java_directbuffer_testIntBuffer (JNIEnv *env, jclass, jobject, jint); -JNIEXPORT void JNICALL Java_directbuffer_testLongBuffer (JNIEnv *env, jclass, jobject, jint); -JNIEXPORT void JNICALL Java_directbuffer_testShortBuffer (JNIEnv *env, jclass, jobject, jint); - -#ifdef __cplusplus -} -#endif - -#endif /* __directbuffer__ */ diff --git a/libjava/testsuite/libjava.jni/directbuffer.jar b/libjava/testsuite/libjava.jni/directbuffer.jar Binary files differdeleted file mode 100644 index f1630dad889..00000000000 --- a/libjava/testsuite/libjava.jni/directbuffer.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/directbuffer.java b/libjava/testsuite/libjava.jni/directbuffer.java deleted file mode 100644 index ee844b9016d..00000000000 --- a/libjava/testsuite/libjava.jni/directbuffer.java +++ /dev/null @@ -1,40 +0,0 @@ -// Test to make sure JNI implementation catches exceptions. - -import java.nio.*; - -public class directbuffer -{ - static - { - System.loadLibrary("directbuffer"); - } - - public static native ByteBuffer createDirectByteBuffer(); - - public static native void testDirectByteBuffer(ByteBuffer bb, int len); - public static native void testCharBuffer(CharBuffer b, int len); - public static native void testDoubleBuffer(DoubleBuffer b, int len); - public static native void testFloatBuffer(FloatBuffer b, int len); - public static native void testIntBuffer(IntBuffer b, int len); - public static native void testLongBuffer(LongBuffer b, int len); - public static native void testShortBuffer(ShortBuffer b, int len); - - public static void main(String[] args) - { - ByteBuffer bb = createDirectByteBuffer(); - CharBuffer cb = bb.asCharBuffer(); - DoubleBuffer db = bb.asDoubleBuffer(); - FloatBuffer fb = bb.asFloatBuffer(); - IntBuffer ib = bb.asIntBuffer(); - LongBuffer lb = bb.asLongBuffer(); - ShortBuffer sb = bb.asShortBuffer(); - - testDirectByteBuffer(bb, 1024); - testCharBuffer(cb, 512); - testDoubleBuffer(db, 128); - testFloatBuffer(fb, 256); - testIntBuffer(ib, 256); - testLongBuffer(lb, 128); - testShortBuffer(sb, 512); - } -} diff --git a/libjava/testsuite/libjava.jni/directbuffer.out b/libjava/testsuite/libjava.jni/directbuffer.out deleted file mode 100644 index c1404b9f21f..00000000000 --- a/libjava/testsuite/libjava.jni/directbuffer.out +++ /dev/null @@ -1,14 +0,0 @@ -PASS: address of direct java.nio.ByteBuffer -PASS: length of direct java.nio.ByteBuffer -PASS: address of java.nio.CharBuffer view -PASS: length of java.nio.CharBuffer view -PASS: address of java.nio.DoubleBuffer view -PASS: length of java.nio.DoubleBuffer view -PASS: address of java.nio.FloatBuffer view -PASS: length of java.nio.FloatBuffer view -PASS: address of java.nio.IntBuffer view -PASS: length of java.nio.IntBuffer view -PASS: address of java.nio.LongBuffer view -PASS: length of java.nio.LongBuffer view -PASS: address of java.nio.ShortBuffer view -PASS: length of java.nio.ShortBuffer view diff --git a/libjava/testsuite/libjava.jni/field.c b/libjava/testsuite/libjava.jni/field.c deleted file mode 100644 index bce0cc896e6..00000000000 --- a/libjava/testsuite/libjava.jni/field.c +++ /dev/null @@ -1,24 +0,0 @@ -#include <jni.h> -#include <field.h> - -JNIEXPORT jobjectArray JNICALL -Java_field_fetch (JNIEnv *env, jobject this) -{ - jclass cls; - jfieldID fid; - jobjectArray obj; - - cls = (*env)->GetObjectClass (env, this); - if (! cls) - return 0; - - fid = (*env)->GetFieldID (env, cls, "F", "[Ljava/lang/Object;"); - if (! fid) - return 0; - - obj = (*env)->GetObjectField (env, this, fid); - - return obj; -} - - diff --git a/libjava/testsuite/libjava.jni/field.h b/libjava/testsuite/libjava.jni/field.h deleted file mode 100644 index fd1597aaee0..00000000000 --- a/libjava/testsuite/libjava.jni/field.h +++ /dev/null @@ -1,19 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#include <jni.h> - -#ifndef __field__ -#define __field__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -JNIEXPORT jobjectArray JNICALL Java_field_fetch (JNIEnv *env, jobject); - -#ifdef __cplusplus -} -#endif - -#endif /* __field__ */ diff --git a/libjava/testsuite/libjava.jni/field.jar b/libjava/testsuite/libjava.jni/field.jar Binary files differdeleted file mode 100644 index 3f636e842cc..00000000000 --- a/libjava/testsuite/libjava.jni/field.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/field.java b/libjava/testsuite/libjava.jni/field.java deleted file mode 100644 index bd0f7492e9f..00000000000 --- a/libjava/testsuite/libjava.jni/field.java +++ /dev/null @@ -1,25 +0,0 @@ -// Test for array field lookup. - -public class field -{ - // 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) - { - field q = new field (); - q.doit (); - } - - static - { - System.loadLibrary ("field"); - } -} diff --git a/libjava/testsuite/libjava.jni/field.out b/libjava/testsuite/libjava.jni/field.out deleted file mode 100644 index 27ba77ddaf6..00000000000 --- a/libjava/testsuite/libjava.jni/field.out +++ /dev/null @@ -1 +0,0 @@ -true diff --git a/libjava/testsuite/libjava.jni/final_method.c b/libjava/testsuite/libjava.jni/final_method.c deleted file mode 100644 index 76d5ae52827..00000000000 --- a/libjava/testsuite/libjava.jni/final_method.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <final_method.h> - -JNIEXPORT jstring JNICALL -Java_final_1method_meth (JNIEnv *env, jobject thisv) -{ - return (*env)->NewStringUTF (env, "zardoz has spoken"); -} diff --git a/libjava/testsuite/libjava.jni/final_method.h b/libjava/testsuite/libjava.jni/final_method.h deleted file mode 100644 index dbb8235496d..00000000000 --- a/libjava/testsuite/libjava.jni/final_method.h +++ /dev/null @@ -1,19 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#include <jni.h> - -#ifndef __final_1method__ -#define __final_1method__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -JNIEXPORT jstring JNICALL Java_final_1method_meth (JNIEnv *env, jobject); - -#ifdef __cplusplus -} -#endif - -#endif /* __final_1method__ */ diff --git a/libjava/testsuite/libjava.jni/final_method.jar b/libjava/testsuite/libjava.jni/final_method.jar Binary files differdeleted file mode 100644 index a5f4b63f305..00000000000 --- a/libjava/testsuite/libjava.jni/final_method.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/final_method.java b/libjava/testsuite/libjava.jni/final_method.java deleted file mode 100644 index dcb684e0849..00000000000 --- a/libjava/testsuite/libjava.jni/final_method.java +++ /dev/null @@ -1,17 +0,0 @@ -// Minimal test a non-static final method. - -public class final_method -{ - static - { - System.loadLibrary ("final_method"); - } - - public final native String meth (); - - public static void main (String[] args) - { - final_method fm = new final_method (); - System.out.println (fm.meth ()); - } -} diff --git a/libjava/testsuite/libjava.jni/final_method.out b/libjava/testsuite/libjava.jni/final_method.out deleted file mode 100644 index d93c9b5587e..00000000000 --- a/libjava/testsuite/libjava.jni/final_method.out +++ /dev/null @@ -1 +0,0 @@ -zardoz has spoken diff --git a/libjava/testsuite/libjava.jni/findclass.c b/libjava/testsuite/libjava.jni/findclass.c deleted file mode 100644 index 1a58a55fee4..00000000000 --- a/libjava/testsuite/libjava.jni/findclass.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdlib.h> - -#include <findclass.h> - -JNIEXPORT jclass JNICALL -Java_findclass_doit (JNIEnv *env, jclass klass, jstring name) -{ - const char *buf = (*env)->GetStringUTFChars (env, name, NULL); - jclass k = (*env)->FindClass (env, buf); - (*env)->ReleaseStringUTFChars (env, name, buf); - return k; -} diff --git a/libjava/testsuite/libjava.jni/findclass.h b/libjava/testsuite/libjava.jni/findclass.h deleted file mode 100644 index d0d301e9359..00000000000 --- a/libjava/testsuite/libjava.jni/findclass.h +++ /dev/null @@ -1,19 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#include <jni.h> - -#ifndef __findclass__ -#define __findclass__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -JNIEXPORT jclass JNICALL Java_findclass_doit (JNIEnv *env, jclass, jstring); - -#ifdef __cplusplus -} -#endif - -#endif /* __findclass__ */ diff --git a/libjava/testsuite/libjava.jni/findclass.jar b/libjava/testsuite/libjava.jni/findclass.jar Binary files differdeleted file mode 100644 index 03fe860f7e9..00000000000 --- a/libjava/testsuite/libjava.jni/findclass.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/findclass.java b/libjava/testsuite/libjava.jni/findclass.java deleted file mode 100644 index b857538e663..00000000000 --- a/libjava/testsuite/libjava.jni/findclass.java +++ /dev/null @@ -1,16 +0,0 @@ -// Test FindClass part of JNI. - -public class findclass -{ - static - { - System.loadLibrary ("findclass"); - } - - public static native Class doit (String name); - - public static void main (String[] args) - { - System.out.println ("" + doit ("java/lang/String")); - } -} diff --git a/libjava/testsuite/libjava.jni/findclass.out b/libjava/testsuite/libjava.jni/findclass.out deleted file mode 100644 index 124026a2e98..00000000000 --- a/libjava/testsuite/libjava.jni/findclass.out +++ /dev/null @@ -1 +0,0 @@ -class java.lang.String diff --git a/libjava/testsuite/libjava.jni/findclass2.c b/libjava/testsuite/libjava.jni/findclass2.c deleted file mode 100644 index 634aea71054..00000000000 --- a/libjava/testsuite/libjava.jni/findclass2.c +++ /dev/null @@ -1,9 +0,0 @@ -#include <stdlib.h> - -#include <findclass2.h> - -JNIEXPORT void JNICALL -Java_findclass2_searchClass (JNIEnv *env, jclass klass) -{ - (*env)->FindClass (env, "findclass2$inner"); -} diff --git a/libjava/testsuite/libjava.jni/findclass2.h b/libjava/testsuite/libjava.jni/findclass2.h deleted file mode 100644 index 65d074644f4..00000000000 --- a/libjava/testsuite/libjava.jni/findclass2.h +++ /dev/null @@ -1,19 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#include <jni.h> - -#ifndef __findclass2__ -#define __findclass2__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -JNIEXPORT void JNICALL Java_findclass2_searchClass (JNIEnv *env, jclass); - -#ifdef __cplusplus -} -#endif - -#endif /* __findclass2__ */ diff --git a/libjava/testsuite/libjava.jni/findclass2.jar b/libjava/testsuite/libjava.jni/findclass2.jar Binary files differdeleted file mode 100644 index 05f867dce0c..00000000000 --- a/libjava/testsuite/libjava.jni/findclass2.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/findclass2.java b/libjava/testsuite/libjava.jni/findclass2.java deleted file mode 100644 index f7c0996e19a..00000000000 --- a/libjava/testsuite/libjava.jni/findclass2.java +++ /dev/null @@ -1,24 +0,0 @@ -// Test that FindClass initializes the class. - -public class findclass2 -{ - public static class inner - { - static - { - System.out.println("hello"); - } - } - - public static native void searchClass(); - - static - { - System.loadLibrary("findclass2"); - } - - public static void main(String[] args) - { - searchClass(); - } -} diff --git a/libjava/testsuite/libjava.jni/findclass2.out b/libjava/testsuite/libjava.jni/findclass2.out deleted file mode 100644 index ce013625030..00000000000 --- a/libjava/testsuite/libjava.jni/findclass2.out +++ /dev/null @@ -1 +0,0 @@ -hello diff --git a/libjava/testsuite/libjava.jni/iface.c b/libjava/testsuite/libjava.jni/iface.c deleted file mode 100644 index 6d33dc01f25..00000000000 --- a/libjava/testsuite/libjava.jni/iface.c +++ /dev/null @@ -1,40 +0,0 @@ -#include <stdlib.h> -#include <stdio.h> -#include <iface.h> - -void check (JNIEnv *); - -void check(JNIEnv *env) -{ - if ((*env)->ExceptionCheck(env) != JNI_FALSE) - { - fprintf(stderr, "UNEXPECTED EXCEPTION\n"); - exit(-1); - } -} - -void -Java_iface_doCalls (JNIEnv *env, jobject self, jobject other) -{ - jclass iface_class, comparable_class; - jmethodID iface_meth, comparable_meth; - jvalue args[1]; - - iface_class = (*env)->FindClass(env, "iface"); - check (env); - comparable_class = (*env)->FindClass (env, "mycomp"); - check (env); - - iface_meth = (*env)->GetMethodID (env, iface_class, "compareTo", - "(Ljava/lang/Object;)I"); - check (env); - comparable_meth = (*env)->GetMethodID (env, comparable_class, "compareTo", - "(Ljava/lang/Object;)I"); - check (env); - - args[0].l = other; - (*env)->CallObjectMethodA (env, self, iface_meth, args); - check (env); - (*env)->CallObjectMethodA (env, self, comparable_meth, args); - check (env); -} diff --git a/libjava/testsuite/libjava.jni/iface.h b/libjava/testsuite/libjava.jni/iface.h deleted file mode 100644 index 58680dd90c4..00000000000 --- a/libjava/testsuite/libjava.jni/iface.h +++ /dev/null @@ -1,19 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#include <jni.h> - -#ifndef __iface__ -#define __iface__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -JNIEXPORT void JNICALL Java_iface_doCalls (JNIEnv *env, jobject, jobject); - -#ifdef __cplusplus -} -#endif - -#endif /* __iface__ */ diff --git a/libjava/testsuite/libjava.jni/iface.jar b/libjava/testsuite/libjava.jni/iface.jar Binary files differdeleted file mode 100644 index 0a9a1af3cf6..00000000000 --- a/libjava/testsuite/libjava.jni/iface.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/iface.java b/libjava/testsuite/libjava.jni/iface.java deleted file mode 100644 index c878ae362ea..00000000000 --- a/libjava/testsuite/libjava.jni/iface.java +++ /dev/null @@ -1,27 +0,0 @@ -// JNI calls via an interface method were broken in a couple releases. - -interface mycomp -{ - int compareTo(Object x); -} - -public class iface implements mycomp -{ - static - { - System.loadLibrary("iface"); - } - - public int compareTo (Object x) - { - System.out.println ("hi maude"); - return 3; - } - - public native void doCalls(Object x); - - public static void main (String[] args) - { - new iface().doCalls(args); - } -} diff --git a/libjava/testsuite/libjava.jni/iface.out b/libjava/testsuite/libjava.jni/iface.out deleted file mode 100644 index 4eb3a1b43f7..00000000000 --- a/libjava/testsuite/libjava.jni/iface.out +++ /dev/null @@ -1,2 +0,0 @@ -hi maude -hi maude diff --git a/libjava/testsuite/libjava.jni/init$NativeClass.h b/libjava/testsuite/libjava.jni/init$NativeClass.h deleted file mode 100644 index 0ae6d4cc477..00000000000 --- a/libjava/testsuite/libjava.jni/init$NativeClass.h +++ /dev/null @@ -1,19 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#include <jni.h> - -#ifndef __init_00024NativeClass__ -#define __init_00024NativeClass__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -JNIEXPORT void JNICALL Java_init_00024NativeClass_printHello (JNIEnv *env, jclass); - -#ifdef __cplusplus -} -#endif - -#endif /* __init_00024NativeClass__ */ diff --git a/libjava/testsuite/libjava.jni/init.c b/libjava/testsuite/libjava.jni/init.c deleted file mode 100644 index 458d6d78940..00000000000 --- a/libjava/testsuite/libjava.jni/init.c +++ /dev/null @@ -1,8 +0,0 @@ -#include <jni.h> -#include <init$NativeClass.h> - -JNIEXPORT void JNICALL -Java_init_00024NativeClass_printHello(JNIEnv *env, jclass cl) -{ - printf("hello\n"); -} diff --git a/libjava/testsuite/libjava.jni/init.h b/libjava/testsuite/libjava.jni/init.h deleted file mode 100644 index 4ad329871e1..00000000000 --- a/libjava/testsuite/libjava.jni/init.h +++ /dev/null @@ -1,18 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#include <jni.h> - -#ifndef __init__ -#define __init__ - -#ifdef __cplusplus -extern "C" -{ -#endif - - -#ifdef __cplusplus -} -#endif - -#endif /* __init__ */ diff --git a/libjava/testsuite/libjava.jni/init.jar b/libjava/testsuite/libjava.jni/init.jar Binary files differdeleted file mode 100644 index 1bf20ac9827..00000000000 --- a/libjava/testsuite/libjava.jni/init.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/init.java b/libjava/testsuite/libjava.jni/init.java deleted file mode 100644 index 3303d319e74..00000000000 --- a/libjava/testsuite/libjava.jni/init.java +++ /dev/null @@ -1,26 +0,0 @@ -// Regression test for JNI and static initializers. - -public class init -{ - public static class NativeClass - { - static - { - System.out.println("static initializer 2"); - System.loadLibrary("init"); // if it's here, this app doesn't work - } - - public static native void printHello(); - } - - static - { - System.out.println("static initializer 1"); - } - - public static void main(String[] args) - { - //System.loadLibrary("test"); // if it's here, this app works - NativeClass.printHello(); - } -} diff --git a/libjava/testsuite/libjava.jni/init.out b/libjava/testsuite/libjava.jni/init.out deleted file mode 100644 index 4e62d1ffe6b..00000000000 --- a/libjava/testsuite/libjava.jni/init.out +++ /dev/null @@ -1,3 +0,0 @@ -static initializer 1 -static initializer 2 -hello diff --git a/libjava/testsuite/libjava.jni/invocation/PR16923.c b/libjava/testsuite/libjava.jni/invocation/PR16923.c deleted file mode 100644 index 881738b61ca..00000000000 --- a/libjava/testsuite/libjava.jni/invocation/PR16923.c +++ /dev/null @@ -1,43 +0,0 @@ -#include <assert.h> -#include <jni.h> - -union env_union -{ - void *void_env; - JNIEnv *jni_env; -}; - -int -main (int argc, const char** argv) -{ - union env_union tmp; - JNIEnv* env; - JavaVM* jvm; - JavaVMInitArgs vm_args; - JavaVMOption options[1]; - jclass class_id; - jmethodID method_id; - jint result; - - options[0].optionString = "-DPR16923=optionReceived"; - - vm_args.version = JNI_VERSION_1_2; - vm_args.ignoreUnrecognized = JNI_TRUE; - vm_args.options = options; - vm_args.nOptions = 1; - - result = JNI_CreateJavaVM (&jvm, &tmp.void_env, &vm_args); - assert (result >= 0); - - env = tmp.jni_env; - - class_id = (*env)->FindClass (env, "PR16923"); - assert (class_id); - - method_id = (*env)->GetStaticMethodID (env, class_id, "printIt", "()V"); - assert (method_id); - - (*env)->CallStaticVoidMethod (env, class_id, method_id, NULL); - - return 0; -} diff --git a/libjava/testsuite/libjava.jni/invocation/PR16923.jar b/libjava/testsuite/libjava.jni/invocation/PR16923.jar Binary files differdeleted file mode 100644 index a1a7b880473..00000000000 --- a/libjava/testsuite/libjava.jni/invocation/PR16923.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/invocation/PR16923.java b/libjava/testsuite/libjava.jni/invocation/PR16923.java deleted file mode 100644 index efda4bd755a..00000000000 --- a/libjava/testsuite/libjava.jni/invocation/PR16923.java +++ /dev/null @@ -1,7 +0,0 @@ -public class PR16923 -{ - public static void printIt () - { - System.out.println (System.getProperty ("PR16923")); - } -} diff --git a/libjava/testsuite/libjava.jni/invocation/PR16923.out b/libjava/testsuite/libjava.jni/invocation/PR16923.out deleted file mode 100644 index 58bf3fe1982..00000000000 --- a/libjava/testsuite/libjava.jni/invocation/PR16923.out +++ /dev/null @@ -1 +0,0 @@ -optionReceived diff --git a/libjava/testsuite/libjava.jni/invoke.c b/libjava/testsuite/libjava.jni/invoke.c deleted file mode 100644 index c2b78d239cb..00000000000 --- a/libjava/testsuite/libjava.jni/invoke.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <invoke.h> - -JNIEXPORT jint JNICALL -Java_invoke_val (JNIEnv *env, jclass klass) -{ - return 23; -} diff --git a/libjava/testsuite/libjava.jni/invoke.h b/libjava/testsuite/libjava.jni/invoke.h deleted file mode 100644 index 553c598d7d0..00000000000 --- a/libjava/testsuite/libjava.jni/invoke.h +++ /dev/null @@ -1,19 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#include <jni.h> - -#ifndef __invoke__ -#define __invoke__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -JNIEXPORT jint JNICALL Java_invoke_val (JNIEnv *env, jclass); - -#ifdef __cplusplus -} -#endif - -#endif /* __invoke__ */ diff --git a/libjava/testsuite/libjava.jni/invoke.jar b/libjava/testsuite/libjava.jni/invoke.jar Binary files differdeleted file mode 100644 index dd0579740a7..00000000000 --- a/libjava/testsuite/libjava.jni/invoke.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/invoke.java b/libjava/testsuite/libjava.jni/invoke.java deleted file mode 100644 index 91c9d374701..00000000000 --- a/libjava/testsuite/libjava.jni/invoke.java +++ /dev/null @@ -1,18 +0,0 @@ -// Test to make sure the minimal invocation works. - -public class invoke -{ - public static native int val (); - - static - { - System.out.println ("trying..."); - System.loadLibrary ("invoke"); - System.out.println ("loaded"); - } - - public static void main (String[] args) - { - System.out.println (val ()); - } -} diff --git a/libjava/testsuite/libjava.jni/invoke.out b/libjava/testsuite/libjava.jni/invoke.out deleted file mode 100644 index f59a6d2e495..00000000000 --- a/libjava/testsuite/libjava.jni/invoke.out +++ /dev/null @@ -1,3 +0,0 @@ -trying... -loaded -23 diff --git a/libjava/testsuite/libjava.jni/jni.exp b/libjava/testsuite/libjava.jni/jni.exp deleted file mode 100644 index 8bd74481deb..00000000000 --- a/libjava/testsuite/libjava.jni/jni.exp +++ /dev/null @@ -1,404 +0,0 @@ -# Tests for JNI code. - -# Compile a single C file and produce a .so file. OPTIONS is a list -# of options to pass to the compiler. Returns 0 on failure, 1 on -# success. -proc gcj_jni_compile_c_to_so {file {options {}}} { - global srcdir subdir - global host_triplet - verbose "options: $options" - set options_cxx $options - set options "" - -# Apple uses a different extension for shared/dynamic libraries -# so we check against powerpc-apple-darwin and set them to -# dylib. -# HP-UX uses sl, so we check this too, otherwise we take so. - - if { [istarget "*-*-darwin*"] } { - set so_extension "dylib" - set so_flag "-dynamiclib" - } elseif { [istarget "hppa*-hp-hpux*"] } { - set so_extension "sl" - set so_flag "-shared" - } elseif { [istarget "*-*-cygwin*"] || [istarget "*-*-mingw*"] } { - set so_extension "dll" - set so_flag "-shared" - } else { - set so_extension "so" - set so_flag "-shared" - } - set filename [file tail $file] - set name [file rootname $filename] - set soname lib${name}.${so_extension} - - if { [istarget "*arm-*eabi*"] } { - lappend options "additional_flags=-fexceptions" - } - - lappend options "additional_flags=${so_flag} -fPIC" - # Find the generated header. - lappend options "additional_flags=-I. -I.. -I$srcdir/$subdir -fdollars-in-identifiers" - - # Ensure that the generated header has correct prototypes. - set cfile [file rootname $file].c - if { [file exists $cfile]} { - # This option is only valid for C sources. - lappend options "additional_flags=-Wmissing-prototypes" - } - - # Find jni.h and jni_md.h. - lappend options "additional_flags=-I$srcdir/../include -I$srcdir/../classpath/include" - - # Append C++ options - lappend options "additional_flags=$options_cxx" - - set x [libjava_prune_warnings \ - [target_compile $file $soname executable $options]] - if {$x != ""} { - verbose "target_compile failed: $x" 2 - fail "$filename compilation" - return 0 - } - - pass "$filename compilation" - return 1 -} - -# Build a header file from a .class file. Return 0 on failure. -proc gcj_jni_build_header {file} { - global libgcj_jar - - set gcjh [find_gcjh] - set file [file rootname $file] - - set cmd "$gcjh -jni -force -classpath .:$libgcj_jar $file" - verbose $cmd - - set x [string trim [libjava_prune_warnings \ - [lindex [local_exec $cmd "" "" 300] 1]]] - if {$x != ""} { - verbose "local_exec failed: $x" 2 - fail "$file header generation" - return 0 - } - - pass "$file header generation" - return 1 -} - -# Do all the work for a single JNI test. Return 0 on failure. -proc gcj_jni_test_one {file} { - global runtests - global host_triplet - global INTERPRETER - -# Apple uses a different extension for shared/dynamic libraries -# so we check against powerpc-apple-darwin and set them to -# dylib. -# HP-UX uses sl, so we check this too, otherwise we take so. - - if { [istarget "*-*-darwin*"] } { - set so_extension "dylib" - } elseif { [istarget "hppa*-hp-hpux*"] } { - set so_extension "sl" - } elseif { [istarget "*-*-cygwin*"] || [istarget "*-*-mingw*"] } { - set so_extension "dll" - } else { - set so_extension "so" - } - - # The base name. We use it for several purposes. - set main [file rootname [file tail $file]] - if {! [runtest_file_p $runtests $main] - || $main == "pr29812" || $main == "pr29812_injar"} { - # Simply skip it. - return 1 - } - -# if {! [bytecompile_file $file [pwd]]} { -# fail "bytecompile $file" -# # FIXME - should use `untested' on all remaining tests. -# # But that is hard. -# return 0 -# } -# pass "bytecompile $file" - -# set bytefile [file rootname [file tail $file]].class -# if {! [gcj_jni_build_header $bytefile]} { -# # FIXME -# return 0 -# } - - set cfile [file rootname $file].c - set cxxflags "" - set cxxldlibflags {} - # If there is no `.c' file, assume there is a `.cc' file. - if {! [file exists $cfile]} { - set cfile [file rootname $file].cc - - set cxxflaglist {} - foreach arg [split [libjava_find_lib libstdc++-v3/src stdc++] " "] { - switch -glob -- $arg { - "-L*" { - set arg [string range $arg 2 end] - lappend cxxldlibflags $arg - # Strip the `.libs' directory; we link with libtool which - # doesn't need it. - set arg "-L[file dirname $arg]" - } - } - lappend cxxflaglist $arg - # In case the libstdc++ is not installed yet, we pass the build - # directory of it to the cxxflaglist. - lappend cxxflaglist "-L$cxxldlibflags" - } - - # If you're building the compiler with --prefix set to a place - # where it's not yet installed, then the linker won't be able to - # find the libgcc used by libffi.dylib. We could pass the - # -dylib_file option, but that's complicated, and it's much easier - # to just make the linker find libgcc using -L options. - if { [istarget "*-*-darwin*"] } { - lappend cxxflaglist "-shared-libgcc -lstdc++" - } else { - lappend cxxflaglist "-lstdc++" - } - - # ARM C++ emits an ABI warning for varargs. - if { [istarget "arm*"] } { - lappend cxxflaglist "-Wno-abi" - } - - set cxxflags [join $cxxflaglist] - } - - if {! [gcj_jni_compile_c_to_so $cfile $cxxflags]} { - # FIXME - return 0 - } - - set args [list "additional_flags=-fjni"] - if {! [gcj_link $main $main $file $args]} { - # FIXME - return 0 - } - - set resultfile [file rootname $file].out - - if {! [gcj_invoke $main $resultfile $cxxldlibflags]} { - # FIXME - return 0 - } - - # We purposely ignore errors here; we still want to run the other - # appropriate tests. - set errname [file rootname [file tail $file]] - set gij [libjava_find_gij] - # libjava_find_gij will return "" if it couldn't find the - # program; in this case we want to skip the test. - # If the libraries are not installed yet, we have to pass them via - # cxxldlibflags to libjava_invoke. - if {$INTERPRETER == "yes" && $gij != ""} { - libjava_invoke $errname "gij test" opts $gij \ - "" $resultfile $cxxldlibflags \ - -classpath $file $main - } - - # When we succeed we remove all our clutter. - eval gcj_cleanup [glob -nocomplain -- ${main}.*] \ - [list $main lib${main}.${so_extension}] - - return 1 -} - -# Compile a single C file and produce a binary. OPTIONS is a list of -# options to pass to the compiler. Returns 0 on failure, 1 on -# success. -proc gcj_jni_invocation_compile_c_to_binary {file {options {}}} { - global srcdir subdir - global host_triplet - verbose "options: $options" - set options_cxx $options - set options "" - - set filename [file tail $file] - set name [file rootname $filename] - - # Set some darwin specific options - if { [istarget "*-*-darwin*"] } { - lappend options "additional_flags= -bind_at_load -multiply_defined suppress" - } - # Find the generated header. - lappend options "additional_flags=-I. -I.. -I$srcdir/$subdir" - - # Find jni.h and jni_md.h. - lappend options "additional_flags=-I$srcdir/../include -I$srcdir/../classpath/include -fdollars-in-identifiers" - - # Append C++ options - lappend options "additional_flags=$options_cxx" - - set x [libjava_prune_warnings \ - [target_compile $file $name executable $options]] - if {$x != ""} { - verbose "target_compile failed: $x" 2 - fail "$filename compilation" - return 0 - } - - pass "$filename compilation" - return 1 -} - -proc gcj_jni_get_cxxflags_invocation {} { - global libiconv - global LIBJAVA - if {$libiconv == ""} { - set libiconv "-liconv" - } - if [info exists LIBJAVA] { - set libjava $LIBJAVA; - } else { - set libjava [libjava_find_lib libjava gcj] - } - set cxxflags "$libjava -ljvm" - - # Darwin needs -liconv linked, otherwise we get some unresolved. - # If you're building the compiler with --prefix set to a place - # where it's not yet installed, then the linker won't be able to - # find the libgcc used by libffi.dylib. We could pass the - # -dylib_file option, but that's complicated, and it's much easier - # to just make the linker find libgcc using -L options. - # Similar logic applies to libgcj. - if { [istarget "*-*-darwin*"] } { - eval lappend cxxflags "-shared-libgcc -lgcj $libiconv" - } - - # FreeBSD needs -liconv linked, otherwise we get some unresolved. - if { [istarget "*-*-freebsd*"] } { - eval lappend cxxflags "$libiconv" - } - - # Make sure libgcc unwinder is used on 64-bit Solaris 10+/x86 rather than - # the libc one. - if { [istarget "*-*-solaris*"] } { - lappend cxxflags "-shared-libgcc" - } - - return $cxxflags -} - -# Do all the work for a single invocation API test. Return 0 on -# failure. -proc gcj_jni_invocation_test_one {file} { - global env - global runtests - global host_triplet - global INTERPRETER - - # The base name. We use it for several purposes. - set main [file rootname [file tail $file]] - if {! [runtest_file_p $runtests $main]} { - # Simply skip it. - return 1 - } - -# if {! [bytecompile_file $file [pwd]]} { -# fail "bytecompile $file" -# # FIXME - should use `untested' on all remaining tests. -# # But that is hard. -# return 0 -# } -# pass "bytecompile $file" - - set cfile [file rootname $file].c - - set cxxflags [gcj_jni_get_cxxflags_invocation] - if {! [gcj_jni_invocation_compile_c_to_binary $cfile $cxxflags]} { - # FIXME - return 0 - } - - set resultfile [file rootname $file].out - - set env(CLASSPATH) $file - verbose "CLASSPATH = $env(CLASSPATH)" - if {! [gcj_invoke $main $resultfile ""]} { - unset env(CLASSPATH) - # FIXME - return 0 - } - unset env(CLASSPATH) - - # We purposely ignore errors here; we still want to run the other - # appropriate tests. - set errname [file rootname [file tail $file]] - - # When we succeed we remove all our clutter. - eval gcj_cleanup [glob -nocomplain -- ${main}.*] \ - [list $main] - - return 1 -} - -proc gcj_jni_pr29812 {} { - global srcdir subdir - global INTERPRETER runtests - - # Set up a global we need. - libjava_arguments - - set b ${srcdir}/${subdir} - - if {! [runtest_file_p $runtests pr29812]} { - # Simply skip it. - return 1 - } - - if {! [gcj_jni_compile_c_to_so $b/pr29812.c ""]} { - return 0 - } - if {! [gcj_jni_compile_c_to_so $b/pr29812_injar.c ""]} { - return 0 - } - - set gij [libjava_find_gij] - if {$INTERPRETER == "yes" && $gij != ""} { - if {! [libjava_invoke pr29812 "gij test" opts $gij \ - "" $b/pr29812.out "" \ - -classpath $b/pr29812.jar pr29812 $b/pr29812_injar.jar]} { - return 0 - } - } - - # When we succeed we remove all our clutter. - eval gcj_cleanup [glob -nocomplain -- *pr29812*] -} - -# Run the JNI tests. -proc gcj_jni_run {} { - global srcdir subdir - global build_triplet host_triplet - - # For now we only test JNI on native builds. - if {$build_triplet == $host_triplet} { - catch { lsort [glob -nocomplain ${srcdir}/${subdir}/*.jar] } srcfiles - - foreach x $srcfiles { - gcj_jni_test_one $x - } - - # Run JNI invocation API tests - catch { lsort [glob -nocomplain ${srcdir}/${subdir}/invocation/*.jar] } srcfiles - - foreach x $srcfiles { - gcj_jni_invocation_test_one $x - } - - gcj_jni_pr29812 - } else { - verbose "JNI tests not run in cross-compilation environment" - } -} - -gcj_jni_run diff --git a/libjava/testsuite/libjava.jni/jniutf.c b/libjava/testsuite/libjava.jni/jniutf.c deleted file mode 100644 index 1ccc7ea938d..00000000000 --- a/libjava/testsuite/libjava.jni/jniutf.c +++ /dev/null @@ -1,10 +0,0 @@ -#include <jniutf.h> - -JNIEXPORT void JNICALL -Java_jniutf_printString (JNIEnv *env, jobject obj, jstring str) -{ - const char *cstr; - - cstr = (*env)->GetStringUTFChars (env, str, NULL); - (*env)->ReleaseStringUTFChars (env, str, cstr); -} diff --git a/libjava/testsuite/libjava.jni/jniutf.h b/libjava/testsuite/libjava.jni/jniutf.h deleted file mode 100644 index b58db2e3248..00000000000 --- a/libjava/testsuite/libjava.jni/jniutf.h +++ /dev/null @@ -1,19 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#include <jni.h> - -#ifndef __jniutf__ -#define __jniutf__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -JNIEXPORT void JNICALL Java_jniutf_printString (JNIEnv *env, jobject, jstring); - -#ifdef __cplusplus -} -#endif - -#endif /* __jniutf__ */ diff --git a/libjava/testsuite/libjava.jni/jniutf.jar b/libjava/testsuite/libjava.jni/jniutf.jar Binary files differdeleted file mode 100644 index 764808c4f17..00000000000 --- a/libjava/testsuite/libjava.jni/jniutf.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/jniutf.java b/libjava/testsuite/libjava.jni/jniutf.java deleted file mode 100644 index e03e16e29ca..00000000000 --- a/libjava/testsuite/libjava.jni/jniutf.java +++ /dev/null @@ -1,16 +0,0 @@ -public class jniutf -{ - native void printString (String str); - - static - { - System.loadLibrary ("jniutf"); - } - - public static void main (String[] args) - { - - String s1 = new String("\u3040\u3041\u3042\u3043\u3044\u3045\u3046\u3047\u3048\u3049\u304A\u304B\u304C\u304D\u304E\u304F\u3050\u3051\u3052\u3053\u3054\u3055\u3056\u3057\u3058\u3059\u305A\u305B"); - new jniutf().printString (s1); - } -} diff --git a/libjava/testsuite/libjava.jni/jniutf.out b/libjava/testsuite/libjava.jni/jniutf.out deleted file mode 100644 index e69de29bb2d..00000000000 --- a/libjava/testsuite/libjava.jni/jniutf.out +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/martin.c b/libjava/testsuite/libjava.jni/martin.c deleted file mode 100644 index 0fbb8d0aa73..00000000000 --- a/libjava/testsuite/libjava.jni/martin.c +++ /dev/null @@ -1,43 +0,0 @@ -#include <jni.h> -#include "martin.h" -#include <stdio.h> - -JNIEXPORT void JNICALL -Java_martin_myNative(JNIEnv* env, jobject this, jstring s) -{ - jclass cls; - jfieldID fid; - jobject obj; - jmethodID mid; - - printf("From C\n"); - fflush(stdout); - - cls = (*env)->FindClass(env, "java/lang/System"); - if (cls == 0) { - printf("java/lang/System lookup failed\n"); - return; - } - fid = (*env)->GetStaticFieldID(env, cls, "out", "Ljava/io/PrintStream;"); - if (fid == 0) { - printf("java/lang/System::out lookup failed\n"); - return; - } - obj = (*env)->GetStaticObjectField(env, cls, fid); - if (obj == 0) { - printf("GetStaticObjectField call failed\n"); - return; - } - cls = (*env)->GetObjectClass(env, obj); - if (cls == 0) { - printf("GetObjectClass(out) failed\n"); - return; - } - mid = (*env)->GetMethodID(env, cls, "println", "(Ljava/lang/String;)V"); - if (mid == 0) { - printf("println method lookup failed\n"); - return; - } - (*env)->CallVoidMethod(env, obj, mid, s); -} - diff --git a/libjava/testsuite/libjava.jni/martin.h b/libjava/testsuite/libjava.jni/martin.h deleted file mode 100644 index 73b6a062e14..00000000000 --- a/libjava/testsuite/libjava.jni/martin.h +++ /dev/null @@ -1,19 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#include <jni.h> - -#ifndef __martin__ -#define __martin__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -JNIEXPORT void JNICALL Java_martin_myNative (JNIEnv *env, jobject, jstring); - -#ifdef __cplusplus -} -#endif - -#endif /* __martin__ */ diff --git a/libjava/testsuite/libjava.jni/martin.jar b/libjava/testsuite/libjava.jni/martin.jar Binary files differdeleted file mode 100644 index a0293a75f75..00000000000 --- a/libjava/testsuite/libjava.jni/martin.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/martin.java b/libjava/testsuite/libjava.jni/martin.java deleted file mode 100644 index b866a605c2e..00000000000 --- a/libjava/testsuite/libjava.jni/martin.java +++ /dev/null @@ -1,21 +0,0 @@ -// Test case from Martin Kahlert <martin.kahlert@infineon.com> - -public class martin { - public native void myNative(String s); - - public void myJava(String s) { - s = s + ", Java"; - System.out.println(s); - } - - public static void main(String args[]) { - martin x = new martin(); - x.myJava("Hello"); - x.myNative("Hello, Java (from C)"); - x.myJava("Goodbye"); - } - - static { - System.loadLibrary("martin"); - } -} diff --git a/libjava/testsuite/libjava.jni/martin.out b/libjava/testsuite/libjava.jni/martin.out deleted file mode 100644 index a25bc6c28ef..00000000000 --- a/libjava/testsuite/libjava.jni/martin.out +++ /dev/null @@ -1,4 +0,0 @@ -Hello, Java -From C -Hello, Java (from C) -Goodbye, Java diff --git a/libjava/testsuite/libjava.jni/noclass.c b/libjava/testsuite/libjava.jni/noclass.c deleted file mode 100644 index 87c649c30e6..00000000000 --- a/libjava/testsuite/libjava.jni/noclass.c +++ /dev/null @@ -1,9 +0,0 @@ -#include <noclass.h> - -JNIEXPORT void JNICALL -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"); -} diff --git a/libjava/testsuite/libjava.jni/noclass.h b/libjava/testsuite/libjava.jni/noclass.h deleted file mode 100644 index 67869a91675..00000000000 --- a/libjava/testsuite/libjava.jni/noclass.h +++ /dev/null @@ -1,19 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#include <jni.h> - -#ifndef __noclass__ -#define __noclass__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -JNIEXPORT void JNICALL Java_noclass_find_1it (JNIEnv *env, jclass); - -#ifdef __cplusplus -} -#endif - -#endif /* __noclass__ */ diff --git a/libjava/testsuite/libjava.jni/noclass.jar b/libjava/testsuite/libjava.jni/noclass.jar Binary files differdeleted file mode 100644 index 969aa950f33..00000000000 --- a/libjava/testsuite/libjava.jni/noclass.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/noclass.java b/libjava/testsuite/libjava.jni/noclass.java deleted file mode 100644 index 7e0b8c34cca..00000000000 --- a/libjava/testsuite/libjava.jni/noclass.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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) - { - try - { - find_it (); - } - catch (Throwable _) - { - // If find_it() causes a crash, or doesn't throw an exception, - // we won't be running this next line. - System.out.println ("Ok"); - } - } -} diff --git a/libjava/testsuite/libjava.jni/noclass.out b/libjava/testsuite/libjava.jni/noclass.out deleted file mode 100644 index 7326d960397..00000000000 --- a/libjava/testsuite/libjava.jni/noclass.out +++ /dev/null @@ -1 +0,0 @@ -Ok diff --git a/libjava/testsuite/libjava.jni/overload.c b/libjava/testsuite/libjava.jni/overload.c deleted file mode 100644 index 4e7a2d9289b..00000000000 --- a/libjava/testsuite/libjava.jni/overload.c +++ /dev/null @@ -1,16 +0,0 @@ -#include <overload.h> - -JNIEXPORT jint JNICALL -Java_overload_over__I (JNIEnv *env, jclass klass, jint val) -{ - return val; -} - - -JNIEXPORT jint JNICALL -Java_overload_over__II (JNIEnv *env, jclass klass, jint one, jint two) -{ - return one + two; -} - - diff --git a/libjava/testsuite/libjava.jni/overload.h b/libjava/testsuite/libjava.jni/overload.h deleted file mode 100644 index 7b717cd0975..00000000000 --- a/libjava/testsuite/libjava.jni/overload.h +++ /dev/null @@ -1,20 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#include <jni.h> - -#ifndef __overload__ -#define __overload__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -JNIEXPORT jint JNICALL Java_overload_over__I (JNIEnv *env, jclass, jint); -JNIEXPORT jint JNICALL Java_overload_over__II (JNIEnv *env, jclass, jint, jint); - -#ifdef __cplusplus -} -#endif - -#endif /* __overload__ */ diff --git a/libjava/testsuite/libjava.jni/overload.jar b/libjava/testsuite/libjava.jni/overload.jar Binary files differdeleted file mode 100644 index 430d3d665f2..00000000000 --- a/libjava/testsuite/libjava.jni/overload.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/overload.java b/libjava/testsuite/libjava.jni/overload.java deleted file mode 100644 index c2e6037a50c..00000000000 --- a/libjava/testsuite/libjava.jni/overload.java +++ /dev/null @@ -1,18 +0,0 @@ -// Test to make sure overloaded functions with long names work. - -public class overload -{ - static - { - System.loadLibrary ("overload"); - } - - public static native int over (int one); - public static native int over (int one, int two); - - public static void main (String[] args) - { - System.out.println (over (1)); - System.out.println (over (1, 2)); - } -} diff --git a/libjava/testsuite/libjava.jni/overload.out b/libjava/testsuite/libjava.jni/overload.out deleted file mode 100644 index 2b2f2e1b926..00000000000 --- a/libjava/testsuite/libjava.jni/overload.out +++ /dev/null @@ -1,2 +0,0 @@ -1 -3 diff --git a/libjava/testsuite/libjava.jni/pr11951.c b/libjava/testsuite/libjava.jni/pr11951.c deleted file mode 100644 index 4c8ab63f1da..00000000000 --- a/libjava/testsuite/libjava.jni/pr11951.c +++ /dev/null @@ -1,16 +0,0 @@ -#include <stdio.h> -#include <pr11951.h> - -JNIEXPORT void JNICALL -Java_pr11951_nmethod (JNIEnv *env, jclass myclass) -{ - jmethodID method; - jobject r; - - method = (*env)->GetStaticMethodID (env, myclass, "dosomething", - "()Ljava/lang/Object;"); - r = (*env)->CallStaticObjectMethod (env, myclass, method); - printf ("%d\n", r == NULL); - - (*env)->ExceptionClear (env); -} diff --git a/libjava/testsuite/libjava.jni/pr11951.h b/libjava/testsuite/libjava.jni/pr11951.h deleted file mode 100644 index caeefdb85fc..00000000000 --- a/libjava/testsuite/libjava.jni/pr11951.h +++ /dev/null @@ -1,19 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#include <jni.h> - -#ifndef __pr11951__ -#define __pr11951__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -JNIEXPORT void JNICALL Java_pr11951_nmethod (JNIEnv *env, jclass); - -#ifdef __cplusplus -} -#endif - -#endif /* __pr11951__ */ diff --git a/libjava/testsuite/libjava.jni/pr11951.jar b/libjava/testsuite/libjava.jni/pr11951.jar Binary files differdeleted file mode 100644 index adea29fe77c..00000000000 --- a/libjava/testsuite/libjava.jni/pr11951.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/pr11951.java b/libjava/testsuite/libjava.jni/pr11951.java deleted file mode 100644 index e481503ab59..00000000000 --- a/libjava/testsuite/libjava.jni/pr11951.java +++ /dev/null @@ -1,18 +0,0 @@ -public class pr11951 -{ - public static Object dosomething() - { - throw new Error(); - } - - public static native void nmethod(); - - public static void main(String[] args) - { - nmethod(); - } - - static { - System.loadLibrary("pr11951"); - } -} diff --git a/libjava/testsuite/libjava.jni/pr11951.out b/libjava/testsuite/libjava.jni/pr11951.out deleted file mode 100644 index d00491fd7e5..00000000000 --- a/libjava/testsuite/libjava.jni/pr11951.out +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/libjava/testsuite/libjava.jni/pr18278.c b/libjava/testsuite/libjava.jni/pr18278.c deleted file mode 100644 index 7ca73a43062..00000000000 --- a/libjava/testsuite/libjava.jni/pr18278.c +++ /dev/null @@ -1,10 +0,0 @@ -#include <jni.h> -#include <stdio.h> - -#include "pr18278.h" - -jobject Java_pr18278_weakRef(JNIEnv *env, jclass cls, jobject data) -{ - jobject r = (* env)->NewWeakGlobalRef(env, data); - return r; -} diff --git a/libjava/testsuite/libjava.jni/pr18278.h b/libjava/testsuite/libjava.jni/pr18278.h deleted file mode 100644 index 4003fef37df..00000000000 --- a/libjava/testsuite/libjava.jni/pr18278.h +++ /dev/null @@ -1,19 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#include <jni.h> - -#ifndef __pr18278__ -#define __pr18278__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -JNIEXPORT jobject JNICALL Java_pr18278_weakRef (JNIEnv *env, jclass, jobject); - -#ifdef __cplusplus -} -#endif - -#endif /* __pr18278__ */ diff --git a/libjava/testsuite/libjava.jni/pr18278.jar b/libjava/testsuite/libjava.jni/pr18278.jar Binary files differdeleted file mode 100644 index c1bf1489a5b..00000000000 --- a/libjava/testsuite/libjava.jni/pr18278.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/pr18278.java b/libjava/testsuite/libjava.jni/pr18278.java deleted file mode 100644 index 8a39ddebf4d..00000000000 --- a/libjava/testsuite/libjava.jni/pr18278.java +++ /dev/null @@ -1,13 +0,0 @@ -public class pr18278 { - public pr18278() {} - - public static void main(String[] args) { - System.loadLibrary("pr18278"); - String bob = "Bob"; - Object o = weakRef("Bob"); - System.out.println(o); - System.out.println(bob == o); - } - - static native Object weakRef(Object o); -} diff --git a/libjava/testsuite/libjava.jni/pr18278.out b/libjava/testsuite/libjava.jni/pr18278.out deleted file mode 100644 index e01142a4a2f..00000000000 --- a/libjava/testsuite/libjava.jni/pr18278.out +++ /dev/null @@ -1,2 +0,0 @@ -Bob -true diff --git a/libjava/testsuite/libjava.jni/pr23739.c b/libjava/testsuite/libjava.jni/pr23739.c deleted file mode 100644 index 0f6bfbefe16..00000000000 --- a/libjava/testsuite/libjava.jni/pr23739.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdio.h> -#include "pr23739.h" - -JNIEXPORT void JNICALL -Java_pr23739_checkOrder (JNIEnv *env, jclass cls, jclass clazz1, jclass clazz2) -{ - printf ("B extends A\n"); - printf ("isAssignableFrom (A, B): %d\n", - (*env)->IsAssignableFrom (env, clazz1, clazz2)); - printf ("isAssignableFrom (B, A): %d\n", - (*env)->IsAssignableFrom (env, clazz2, clazz1)); -} diff --git a/libjava/testsuite/libjava.jni/pr23739.h b/libjava/testsuite/libjava.jni/pr23739.h deleted file mode 100644 index 70f228c8c0e..00000000000 --- a/libjava/testsuite/libjava.jni/pr23739.h +++ /dev/null @@ -1,19 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#include <jni.h> - -#ifndef __pr23739__ -#define __pr23739__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -JNIEXPORT void JNICALL Java_pr23739_checkOrder (JNIEnv *env, jclass, jclass, jclass); - -#ifdef __cplusplus -} -#endif - -#endif /* __pr23739__ */ diff --git a/libjava/testsuite/libjava.jni/pr23739.jar b/libjava/testsuite/libjava.jni/pr23739.jar Binary files differdeleted file mode 100644 index d8370461b55..00000000000 --- a/libjava/testsuite/libjava.jni/pr23739.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/pr23739.java b/libjava/testsuite/libjava.jni/pr23739.java deleted file mode 100644 index b2e54c5488b..00000000000 --- a/libjava/testsuite/libjava.jni/pr23739.java +++ /dev/null @@ -1,22 +0,0 @@ -public class pr23739 -{ - static - { - System.loadLibrary ("pr23739"); - } - - public static class A - { - } - - public static class B extends A - { - } - - static native void checkOrder (Class clazz1, Class clazz2); - - public static void main (String[] args) - { - checkOrder (A.class, B.class); - } -} diff --git a/libjava/testsuite/libjava.jni/pr23739.out b/libjava/testsuite/libjava.jni/pr23739.out deleted file mode 100644 index 3e94564c244..00000000000 --- a/libjava/testsuite/libjava.jni/pr23739.out +++ /dev/null @@ -1,3 +0,0 @@ -B extends A -isAssignableFrom (A, B): 0 -isAssignableFrom (B, A): 1 diff --git a/libjava/testsuite/libjava.jni/pr29812.c b/libjava/testsuite/libjava.jni/pr29812.c deleted file mode 100644 index 809d5ed2e80..00000000000 --- a/libjava/testsuite/libjava.jni/pr29812.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <pr29812.h> - -void -Java_pr29812_baseN (JNIEnv *env, jclass barf) -{ - /* nothing */ -} diff --git a/libjava/testsuite/libjava.jni/pr29812.h b/libjava/testsuite/libjava.jni/pr29812.h deleted file mode 100644 index 70d19993831..00000000000 --- a/libjava/testsuite/libjava.jni/pr29812.h +++ /dev/null @@ -1,19 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#include <jni.h> - -#ifndef __pr29812__ -#define __pr29812__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -JNIEXPORT void JNICALL Java_pr29812_baseN (JNIEnv *env, jclass); - -#ifdef __cplusplus -} -#endif - -#endif /* __pr29812__ */ diff --git a/libjava/testsuite/libjava.jni/pr29812.jar b/libjava/testsuite/libjava.jni/pr29812.jar Binary files differdeleted file mode 100644 index c3cf6aba0b5..00000000000 --- a/libjava/testsuite/libjava.jni/pr29812.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/pr29812.java b/libjava/testsuite/libjava.jni/pr29812.java deleted file mode 100644 index 4dde744bee3..00000000000 --- a/libjava/testsuite/libjava.jni/pr29812.java +++ /dev/null @@ -1,25 +0,0 @@ -import java.io.File; -import java.net.*; -import java.lang.reflect.Method; - -public class pr29812 -{ - static { - System.loadLibrary("pr29812"); - } - - public static native void baseN(); - - public static void main(String[] args) throws Throwable - { - // Make sure JNI environment is initialized. - baseN(); - - File jar = new File(args[0]); - URL u = jar.toURL(); - URLClassLoader uc = new URLClassLoader(new URL[] { u }); - Class k = uc.loadClass("pr29812_injar"); - Method m = k.getMethod("doit", (Class[]) null); - m.invoke(null, (Object[]) null); - } -} diff --git a/libjava/testsuite/libjava.jni/pr29812.out b/libjava/testsuite/libjava.jni/pr29812.out deleted file mode 100644 index e69de29bb2d..00000000000 --- a/libjava/testsuite/libjava.jni/pr29812.out +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/pr29812_injar.c b/libjava/testsuite/libjava.jni/pr29812_injar.c deleted file mode 100644 index 5b045ce72a8..00000000000 --- a/libjava/testsuite/libjava.jni/pr29812_injar.c +++ /dev/null @@ -1,26 +0,0 @@ - -#include <stdlib.h> -#include <assert.h> -#include <pr29812_injar.h> - -JNIEXPORT jint JNICALL -JNI_OnLoad (JavaVM *vm, void *nothing) -{ - JNIEnv *env; - jint r; - jclass k; - - r = (*vm)->GetEnv (vm, (void **) &env, JNI_VERSION_1_2); - assert (r == JNI_OK); - k = (*env)->FindClass (env, "pr29812_injar$inner"); - assert (k != NULL); - - return JNI_VERSION_1_2; -} - -void -Java_pr29812_1injar_doit (JNIEnv *env, jclass b) -{ - jclass k = (*env)->FindClass(env, "pr29812_injar$inner"); - assert (k != NULL); -} diff --git a/libjava/testsuite/libjava.jni/pr29812_injar.h b/libjava/testsuite/libjava.jni/pr29812_injar.h deleted file mode 100644 index 40f74ff393f..00000000000 --- a/libjava/testsuite/libjava.jni/pr29812_injar.h +++ /dev/null @@ -1,19 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#include <jni.h> - -#ifndef __pr29812_1injar__ -#define __pr29812_1injar__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -JNIEXPORT void JNICALL Java_pr29812_1injar_doit (JNIEnv *env, jclass); - -#ifdef __cplusplus -} -#endif - -#endif /* __pr29812_1injar__ */ diff --git a/libjava/testsuite/libjava.jni/pr29812_injar.jar b/libjava/testsuite/libjava.jni/pr29812_injar.jar Binary files differdeleted file mode 100644 index 438dc0063b5..00000000000 --- a/libjava/testsuite/libjava.jni/pr29812_injar.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/pr29812_injar.java b/libjava/testsuite/libjava.jni/pr29812_injar.java deleted file mode 100644 index 9dc32a3cdcd..00000000000 --- a/libjava/testsuite/libjava.jni/pr29812_injar.java +++ /dev/null @@ -1,12 +0,0 @@ -public class pr29812_injar -{ - public class inner - { - } - - static { - System.loadLibrary("pr29812_injar"); - } - - public static native void doit(); -} diff --git a/libjava/testsuite/libjava.jni/register.c b/libjava/testsuite/libjava.jni/register.c deleted file mode 100644 index 0490902420e..00000000000 --- a/libjava/testsuite/libjava.jni/register.c +++ /dev/null @@ -1,32 +0,0 @@ -#include <stdlib.h> -#include <assert.h> -#include <register.h> - -static jint -some_random_name (JNIEnv *env, jclass k, jint v) -{ - return v - 1; -} - -JNIEXPORT jint JNICALL -JNI_OnLoad (JavaVM *vm, void *nothing) -{ - JNIEnv *env; - JNINativeMethod meth; - jclass k; - jint r; - - r = (*vm)->GetEnv (vm, (void **) &env, JNI_VERSION_1_2); - assert (r == JNI_OK); - k = (*env)->FindClass (env, "register"); - assert (k != NULL); - - meth.name = "doit"; - meth.signature = "(I)I"; - meth.fnPtr = some_random_name; - - r = (*env)->RegisterNatives (env, k, &meth, 1); - assert (r == JNI_OK); - - return JNI_VERSION_1_2; -} diff --git a/libjava/testsuite/libjava.jni/register.h b/libjava/testsuite/libjava.jni/register.h deleted file mode 100644 index 85b606be8cb..00000000000 --- a/libjava/testsuite/libjava.jni/register.h +++ /dev/null @@ -1,19 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#include <jni.h> - -#ifndef __register__ -#define __register__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -JNIEXPORT jint JNICALL Java_register_doit (JNIEnv *env, jclass, jint); - -#ifdef __cplusplus -} -#endif - -#endif /* __register__ */ diff --git a/libjava/testsuite/libjava.jni/register.jar b/libjava/testsuite/libjava.jni/register.jar Binary files differdeleted file mode 100644 index e8682e1a031..00000000000 --- a/libjava/testsuite/libjava.jni/register.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/register.java b/libjava/testsuite/libjava.jni/register.java deleted file mode 100644 index 0c0cbf62891..00000000000 --- a/libjava/testsuite/libjava.jni/register.java +++ /dev/null @@ -1,16 +0,0 @@ -// register.java - Test RegisterNatives. - -public class register -{ - static - { - System.loadLibrary ("register"); - } - - public static native int doit (int z); - - public static void main (String[] args) - { - System.out.println (doit (24)); - } -} diff --git a/libjava/testsuite/libjava.jni/register.out b/libjava/testsuite/libjava.jni/register.out deleted file mode 100644 index 409940768f2..00000000000 --- a/libjava/testsuite/libjava.jni/register.out +++ /dev/null @@ -1 +0,0 @@ -23 diff --git a/libjava/testsuite/libjava.jni/register2.c b/libjava/testsuite/libjava.jni/register2.c deleted file mode 100644 index 318e4d8f408..00000000000 --- a/libjava/testsuite/libjava.jni/register2.c +++ /dev/null @@ -1,48 +0,0 @@ -#include <stdlib.h> -#include <assert.h> -#include <jni.h> - -static int -twentythree (JNIEnv *env, jclass k) -{ - return 23; -} - -static int -oneninetyseven (JNIEnv *env, jclass k) -{ - return 197; -} - -JNIEXPORT jint JNICALL -JNI_OnLoad (JavaVM *vm, void *nothing) -{ - JNIEnv *env; - JNINativeMethod meth; - jclass k; - jint r; - - r = (*vm)->GetEnv (vm, (void **) &env, JNI_VERSION_1_2); - assert (r == JNI_OK); - k = (*env)->FindClass (env, "register2$I1"); - assert (k != NULL); - - meth.name = "doit"; - meth.signature = "()I"; - meth.fnPtr = twentythree; - - r = (*env)->RegisterNatives (env, k, &meth, 1); - assert (r == JNI_OK); - - k = (*env)->FindClass (env, "register2$I2"); - assert (k != NULL); - - meth.name = "doit"; - meth.signature = "()I"; - meth.fnPtr = oneninetyseven; - - r = (*env)->RegisterNatives (env, k, &meth, 1); - assert (r == JNI_OK); - - return JNI_VERSION_1_2; -} diff --git a/libjava/testsuite/libjava.jni/register2.jar b/libjava/testsuite/libjava.jni/register2.jar Binary files differdeleted file mode 100644 index 807524cdc8b..00000000000 --- a/libjava/testsuite/libjava.jni/register2.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/register2.java b/libjava/testsuite/libjava.jni/register2.java deleted file mode 100644 index 2d6c56a3b02..00000000000 --- a/libjava/testsuite/libjava.jni/register2.java +++ /dev/null @@ -1,27 +0,0 @@ -// Another test of RegisterNatives. -// We neglected to track the class name in our internal hash table. -// This is a regression test for the fix. - -public class register2 -{ - static - { - System.loadLibrary ("register2"); - } - - static class I1 - { - public static native int doit (); - } - - static class I2 - { - public static native int doit (); - } - - public static void main (String[] args) - { - System.out.println (new I1().doit()); - System.out.println (new I2().doit()); - } -} diff --git a/libjava/testsuite/libjava.jni/register2.out b/libjava/testsuite/libjava.jni/register2.out deleted file mode 100644 index 5b90358a22b..00000000000 --- a/libjava/testsuite/libjava.jni/register2.out +++ /dev/null @@ -1,2 +0,0 @@ -23 -197 diff --git a/libjava/testsuite/libjava.jni/simple_int.c b/libjava/testsuite/libjava.jni/simple_int.c deleted file mode 100644 index a7c64b0cd5f..00000000000 --- a/libjava/testsuite/libjava.jni/simple_int.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <simple_int.h> - -JNIEXPORT jint JNICALL -Java_simple_1int_nat (JNIEnv *env, jclass klass, jint val) -{ - return 2 * val; -} diff --git a/libjava/testsuite/libjava.jni/simple_int.h b/libjava/testsuite/libjava.jni/simple_int.h deleted file mode 100644 index b0b9b579a8e..00000000000 --- a/libjava/testsuite/libjava.jni/simple_int.h +++ /dev/null @@ -1,19 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#include <jni.h> - -#ifndef __simple_1int__ -#define __simple_1int__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -JNIEXPORT jint JNICALL Java_simple_1int_nat (JNIEnv *env, jclass, jint); - -#ifdef __cplusplus -} -#endif - -#endif /* __simple_1int__ */ diff --git a/libjava/testsuite/libjava.jni/simple_int.jar b/libjava/testsuite/libjava.jni/simple_int.jar Binary files differdeleted file mode 100644 index 1f0bdc67ce0..00000000000 --- a/libjava/testsuite/libjava.jni/simple_int.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/simple_int.java b/libjava/testsuite/libjava.jni/simple_int.java deleted file mode 100644 index 6306c4e9335..00000000000 --- a/libjava/testsuite/libjava.jni/simple_int.java +++ /dev/null @@ -1,16 +0,0 @@ -// Test a simple static function with an `int' argument. - -public class simple_int -{ - public static native int nat (int z); - - static - { - System.loadLibrary ("simple_int"); - } - - public static void main (String[] args) - { - System.out.println (nat (23)); - } -} diff --git a/libjava/testsuite/libjava.jni/simple_int.out b/libjava/testsuite/libjava.jni/simple_int.out deleted file mode 100644 index 9e5feb52569..00000000000 --- a/libjava/testsuite/libjava.jni/simple_int.out +++ /dev/null @@ -1 +0,0 @@ -46 diff --git a/libjava/testsuite/libjava.jni/throwit.c b/libjava/testsuite/libjava.jni/throwit.c deleted file mode 100644 index 34a3ca07676..00000000000 --- a/libjava/testsuite/libjava.jni/throwit.c +++ /dev/null @@ -1,25 +0,0 @@ -#include <stdlib.h> -#include <throwit.h> - -JNIEXPORT void JNICALL -Java_throwit_throwit (JNIEnv *env, jclass klass, jstring name, - jboolean is_new) -{ - const char *buf = (*env)->GetStringUTFChars (env, name, NULL); - jclass k = (*env)->FindClass (env, buf); - (*env)->ReleaseStringUTFChars (env, name, buf); - - if (k == NULL || (*env)->ExceptionCheck (env)) - return; - - if (is_new) - (*env)->ThrowNew (env, k, "the word is zardoz"); - else - { - jmethodID id = (*env)->GetMethodID (env, k, "<init>", - "(Ljava.lang.String;)V"); - jstring z = (*env)->NewStringUTF (env, "zardoz is the word"); - jobject obj = (*env)->NewObject (env, k, id, z); - (*env)->Throw (env, obj); - } -} diff --git a/libjava/testsuite/libjava.jni/throwit.h b/libjava/testsuite/libjava.jni/throwit.h deleted file mode 100644 index 97c7223f7d0..00000000000 --- a/libjava/testsuite/libjava.jni/throwit.h +++ /dev/null @@ -1,19 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#include <jni.h> - -#ifndef __throwit__ -#define __throwit__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -JNIEXPORT void JNICALL Java_throwit_throwit (JNIEnv *env, jclass, jstring, jboolean); - -#ifdef __cplusplus -} -#endif - -#endif /* __throwit__ */ diff --git a/libjava/testsuite/libjava.jni/throwit.jar b/libjava/testsuite/libjava.jni/throwit.jar Binary files differdeleted file mode 100644 index 9fc43b9d871..00000000000 --- a/libjava/testsuite/libjava.jni/throwit.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/throwit.java b/libjava/testsuite/libjava.jni/throwit.java deleted file mode 100644 index 459622d390f..00000000000 --- a/libjava/testsuite/libjava.jni/throwit.java +++ /dev/null @@ -1,33 +0,0 @@ -// Test to see if throw works. - -public class throwit -{ - static - { - System.loadLibrary ("throwit"); - } - - public static native void throwit (String name, boolean is_new); - - public static void main (String[] args) - { - try - { - throwit ("java/lang/UnknownError", false); - } - catch (Throwable x) - { - System.out.println (x.getClass ()); - System.out.println (x.getMessage ()); - } - try - { - throwit ("java/lang/Throwable", true); - } - catch (Throwable x) - { - System.out.println (x.getClass ()); - System.out.println (x.getMessage ()); - } - } -} diff --git a/libjava/testsuite/libjava.jni/throwit.out b/libjava/testsuite/libjava.jni/throwit.out deleted file mode 100644 index c50b7a9abbc..00000000000 --- a/libjava/testsuite/libjava.jni/throwit.out +++ /dev/null @@ -1,4 +0,0 @@ -class java.lang.UnknownError -zardoz is the word -class java.lang.Throwable -the word is zardoz diff --git a/libjava/testsuite/libjava.jni/virtual.c b/libjava/testsuite/libjava.jni/virtual.c deleted file mode 100644 index 0246970835b..00000000000 --- a/libjava/testsuite/libjava.jni/virtual.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <virtual.h> - -JNIEXPORT jboolean JNICALL -Java_virtual_equals (JNIEnv *env, jobject thisv, jobject other) -{ - return JNI_FALSE; -} diff --git a/libjava/testsuite/libjava.jni/virtual.h b/libjava/testsuite/libjava.jni/virtual.h deleted file mode 100644 index 7d9ef8246e5..00000000000 --- a/libjava/testsuite/libjava.jni/virtual.h +++ /dev/null @@ -1,19 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#include <jni.h> - -#ifndef __virtual__ -#define __virtual__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -JNIEXPORT jboolean JNICALL Java_virtual_equals (JNIEnv *env, jobject, jobject); - -#ifdef __cplusplus -} -#endif - -#endif /* __virtual__ */ diff --git a/libjava/testsuite/libjava.jni/virtual.jar b/libjava/testsuite/libjava.jni/virtual.jar Binary files differdeleted file mode 100644 index dd4090b9b30..00000000000 --- a/libjava/testsuite/libjava.jni/virtual.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.jni/virtual.java b/libjava/testsuite/libjava.jni/virtual.java deleted file mode 100644 index 496389ce5e3..00000000000 --- a/libjava/testsuite/libjava.jni/virtual.java +++ /dev/null @@ -1,17 +0,0 @@ -// Minimal test of a virtual method. - -public class virtual -{ - static - { - System.loadLibrary ("virtual"); - } - - public native boolean equals (Object obj); - - public static void main (String[] args) - { - Object v = new virtual (); - System.out.println (v.equals (v)); - } -} diff --git a/libjava/testsuite/libjava.jni/virtual.out b/libjava/testsuite/libjava.jni/virtual.out deleted file mode 100644 index c508d5366f7..00000000000 --- a/libjava/testsuite/libjava.jni/virtual.out +++ /dev/null @@ -1 +0,0 @@ -false |