diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | test/native/lib/PrimlibInterface.c | 162 | ||||
-rw-r--r-- | test/native/lib/PrimlibInterface.h | 141 | ||||
-rw-r--r-- | test/native/lib/PrimlibTest.java | 88 |
4 files changed, 7 insertions, 391 deletions
@@ -1,5 +1,12 @@ 2005-10-24 Dalibor Topic <robilad@kaffe.org> + * test/native/lib/PrimlibInterface.c, + test/native/lib/PrimlibInterface.h, + test/native/lib/PrimlibTest.java: + Removed unused test. + +2005-10-24 Dalibor Topic <robilad@kaffe.org> + * native/jni/classpath/primlib.c, native/jni/classpath/primlib.h: Removed since unused. diff --git a/test/native/lib/PrimlibInterface.c b/test/native/lib/PrimlibInterface.c deleted file mode 100644 index 47918470a..000000000 --- a/test/native/lib/PrimlibInterface.c +++ /dev/null @@ -1,162 +0,0 @@ -#include "PrimlibInterface.h" -#include <primlib.h> - -/* - * Class: PrimlibInterface - * Method: unwrapBoolean - * Signature: (Ljava/lang/Object;)Z - */ -JNIEXPORT jboolean JNICALL Java_PrimlibInterface_unwrapBoolean -(JNIEnv * env, jclass thisClass, jobject o) { - return PRIMLIB_UnwrapBoolean(env, o); -} - -/* - * Class: PrimlibInterface - * Method: unwrapByte - * Signature: (Ljava/lang/Object;)B - */ -JNIEXPORT jbyte JNICALL Java_PrimlibInterface_unwrapByte - (JNIEnv * env, jclass thisClass, jobject o) { - return PRIMLIB_UnwrapByte(env, o); -} - -/* - * Class: PrimlibInterface - * Method: unwrapShort - * Signature: (Ljava/lang/Object;)S - */ -JNIEXPORT jshort JNICALL Java_PrimlibInterface_unwrapShort - (JNIEnv * env, jclass thisClass, jobject o) { - return PRIMLIB_UnwrapShort(env, o); -} - -/* - * Class: PrimlibInterface - * Method: unwrapChar - * Signature: (Ljava/lang/Object;)C - */ -JNIEXPORT jchar JNICALL Java_PrimlibInterface_unwrapChar - (JNIEnv * env, jclass thisClass, jobject o) { - return PRIMLIB_UnwrapChar(env, o); -} - -/* - * Class: PrimlibInterface - * Method: unwrapInt - * Signature: (Ljava/lang/Object;)I - */ -JNIEXPORT jint JNICALL Java_PrimlibInterface_unwrapInt - (JNIEnv * env, jclass thisClass, jobject o) { - return PRIMLIB_UnwrapInt(env, o); -} - -/* - * Class: PrimlibInterface - * Method: unwrapLong - * Signature: (Ljava/lang/Object;)J - */ -JNIEXPORT jlong JNICALL Java_PrimlibInterface_unwrapLong - (JNIEnv * env, jclass thisClass, jobject o) { - return PRIMLIB_UnwrapLong(env, o); -} - -/* - * Class: PrimlibInterface - * Method: unwrapFloat - * Signature: (Ljava/lang/Object;)F - */ -JNIEXPORT jfloat JNICALL Java_PrimlibInterface_unwrapFloat - (JNIEnv * env, jclass thisClass, jobject o) { - return PRIMLIB_UnwrapFloat(env, o); -} - -/* - * Class: PrimlibInterface - * Method: unwrapDouble - * Signature: (Ljava/lang/Object;)D - */ -JNIEXPORT jdouble JNICALL Java_PrimlibInterface_unwrapDouble - (JNIEnv * env, jclass thisClass, jobject o) { - return PRIMLIB_UnwrapDouble(env, o); -} - -/* - * Class: PrimlibInterface - * Method: wrapBoolean - * Signature: (Z)Ljava/lang/Boolean; - */ -JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapBoolean -(JNIEnv * env, jclass thisClass, jboolean val) { - return PRIMLIB_WrapBoolean(env, val); -} - -/* - * Class: PrimlibInterface - * Method: wrapByte - * Signature: (B)Ljava/lang/Byte; - */ -JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapByte -(JNIEnv * env, jclass thisClass, jbyte val) { - return PRIMLIB_WrapByte(env, val); -} - -/* - * Class: PrimlibInterface - * Method: wrapShort - * Signature: (S)Ljava/lang/Short; - */ -JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapShort -(JNIEnv * env, jclass thisClass, jshort val) { - return PRIMLIB_WrapShort(env, val); -} - -/* - * Class: PrimlibInterface - * Method: wrapChar - * Signature: (C)Ljava/lang/Character; - */ -JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapChar -(JNIEnv * env, jclass thisClass, jchar val) { - return PRIMLIB_WrapChar(env, val); -} - -/* - * Class: PrimlibInterface - * Method: wrapInt - * Signature: (I)Ljava/lang/Integer; - */ -JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapInt -(JNIEnv * env, jclass thisClass, jint val) { - return PRIMLIB_WrapInt(env, val); -} - -/* - * Class: PrimlibInterface - * Method: wrapLong - * Signature: (J)Ljava/lang/Long; - */ -JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapLong -(JNIEnv * env, jclass thisClass, jlong val) { - return PRIMLIB_WrapLong(env, val); -} - -/* - * Class: PrimlibInterface - * Method: wrapFloat - * Signature: (F)Ljava/lang/Float; - */ -JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapFloat -(JNIEnv * env, jclass thisClass, jfloat val) { - return PRIMLIB_WrapFloat(env, val); -} - -/* - * Class: PrimlibInterface - * Method: wrapDouble - * Signature: (D)Ljava/lang/Double; - */ -JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapDouble -(JNIEnv * env, jclass thisClass, jdouble val) { - return PRIMLIB_WrapDouble(env, val); -} diff --git a/test/native/lib/PrimlibInterface.h b/test/native/lib/PrimlibInterface.h deleted file mode 100644 index 2e0463cc2..000000000 --- a/test/native/lib/PrimlibInterface.h +++ /dev/null @@ -1,141 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include <jni.h> -/* Header for class PrimlibInterface */ - -#ifndef _Included_PrimlibInterface -#define _Included_PrimlibInterface -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: PrimlibInterface - * Method: unwrapBoolean - * Signature: (Ljava/lang/Object;)Z - */ -JNIEXPORT jboolean JNICALL Java_PrimlibInterface_unwrapBoolean - (JNIEnv *, jclass, jobject); - -/* - * Class: PrimlibInterface - * Method: unwrapByte - * Signature: (Ljava/lang/Object;)B - */ -JNIEXPORT jbyte JNICALL Java_PrimlibInterface_unwrapByte - (JNIEnv *, jclass, jobject); - -/* - * Class: PrimlibInterface - * Method: unwrapShort - * Signature: (Ljava/lang/Object;)S - */ -JNIEXPORT jshort JNICALL Java_PrimlibInterface_unwrapShort - (JNIEnv *, jclass, jobject); - -/* - * Class: PrimlibInterface - * Method: unwrapChar - * Signature: (Ljava/lang/Object;)C - */ -JNIEXPORT jchar JNICALL Java_PrimlibInterface_unwrapChar - (JNIEnv *, jclass, jobject); - -/* - * Class: PrimlibInterface - * Method: unwrapInt - * Signature: (Ljava/lang/Object;)I - */ -JNIEXPORT jint JNICALL Java_PrimlibInterface_unwrapInt - (JNIEnv *, jclass, jobject); - -/* - * Class: PrimlibInterface - * Method: unwrapLong - * Signature: (Ljava/lang/Object;)J - */ -JNIEXPORT jlong JNICALL Java_PrimlibInterface_unwrapLong - (JNIEnv *, jclass, jobject); - -/* - * Class: PrimlibInterface - * Method: unwrapFloat - * Signature: (Ljava/lang/Object;)F - */ -JNIEXPORT jfloat JNICALL Java_PrimlibInterface_unwrapFloat - (JNIEnv *, jclass, jobject); - -/* - * Class: PrimlibInterface - * Method: unwrapDouble - * Signature: (Ljava/lang/Object;)D - */ -JNIEXPORT jdouble JNICALL Java_PrimlibInterface_unwrapDouble - (JNIEnv *, jclass, jobject); - -/* - * Class: PrimlibInterface - * Method: wrapBoolean - * Signature: (Z)Ljava/lang/Boolean; - */ -JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapBoolean - (JNIEnv *, jclass, jboolean); - -/* - * Class: PrimlibInterface - * Method: wrapByte - * Signature: (B)Ljava/lang/Byte; - */ -JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapByte - (JNIEnv *, jclass, jbyte); - -/* - * Class: PrimlibInterface - * Method: wrapShort - * Signature: (S)Ljava/lang/Short; - */ -JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapShort - (JNIEnv *, jclass, jshort); - -/* - * Class: PrimlibInterface - * Method: wrapChar - * Signature: (C)Ljava/lang/Character; - */ -JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapChar - (JNIEnv *, jclass, jchar); - -/* - * Class: PrimlibInterface - * Method: wrapInt - * Signature: (I)Ljava/lang/Integer; - */ -JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapInt - (JNIEnv *, jclass, jint); - -/* - * Class: PrimlibInterface - * Method: wrapLong - * Signature: (J)Ljava/lang/Long; - */ -JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapLong - (JNIEnv *, jclass, jlong); - -/* - * Class: PrimlibInterface - * Method: wrapFloat - * Signature: (F)Ljava/lang/Float; - */ -JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapFloat - (JNIEnv *, jclass, jfloat); - -/* - * Class: PrimlibInterface - * Method: wrapDouble - * Signature: (D)Ljava/lang/Double; - */ -JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapDouble - (JNIEnv *, jclass, jdouble); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/test/native/lib/PrimlibTest.java b/test/native/lib/PrimlibTest.java deleted file mode 100644 index 94b2fb41c..000000000 --- a/test/native/lib/PrimlibTest.java +++ /dev/null @@ -1,88 +0,0 @@ -public class PrimlibTest { - static { - System.loadLibrary("jnilinktest"); - } - - public static void main(String args[]) { - Object[] o = new Object[8]; - o[0] = new Boolean(true); - o[1] = new Byte((byte)1); - o[2] = new Short((short)2); - o[3] = new Character((char)3); - o[4] = new Integer(4); - o[5] = new Long(5L); - o[6] = new Float(6F); - o[7] = new Double(7D); - - String[] s = {"boolean", "byte", "short", "char", "int", "long", "float", "double"}; - for(int i=0;i<8;i++) { - try { - System.out.println(PrimlibInterface.unwrapBoolean(o[i]) ? "CONVERTED: UnwrapBoolean(" + s[i] + ")" : "INCORRECT: UnwrapBoolean(" + s[i] + ")"); - } catch(Exception E) { - System.out.println("EXCEPTION: UnwrapBoolean(" + s[i] + ")"); - } - - try { - System.out.println(PrimlibInterface.unwrapByte(o[i]) == i ? "CONVERTED: UnwrapByte(" + s[i] + ")" : "INCORRECT: UnwrapByte(" + s[i] + ")"); - } catch(Exception E) { - System.out.println("EXCEPTION: UnwrapByte(" + s[i] + ")"); - } - - try { - System.out.println(PrimlibInterface.unwrapShort(o[i]) == i ? "CONVERTED: UnwrapShort(" + s[i] + ")" : "INCORRECT: UnwrapShort(" + s[i] + ")"); - } catch(Exception E) { - System.out.println("EXCEPTION: UnwrapShort(" + s[i] + ")"); - } - - try { - System.out.println(PrimlibInterface.unwrapChar(o[i]) == i ? "CONVERTED: UnwrapChar(" + s[i] + ")" : "INCORRECT: UnwrapChar(" + s[i] + ")"); - } catch(Exception E) { - System.out.println("EXCEPTION: UnwrapChar(" + s[i] + ")"); - } - - try { - System.out.println(PrimlibInterface.unwrapInt(o[i]) == i ? "CONVERTED: UnwrapInt(" + s[i] + ")" : "INCORRECT: UnwrapInt(" + s[i] + ")"); - } catch(Exception E) { - System.out.println("EXCEPTION: UnwrapInt(" + s[i] + ")"); - } - - try { - System.out.println(PrimlibInterface.unwrapLong(o[i]) == i ? "CONVERTED: UnwrapLong(" + s[i] + ")" : "INCORRECT: UnwrapLong(" + s[i] + ")"); - } catch(Exception E) { - System.out.println("EXCEPTION: UnwrapLong(" + s[i] + ")"); - } - - try { - System.out.println(PrimlibInterface.unwrapFloat(o[i]) == i ? "CONVERTED: UnwrapFloat(" + s[i] + ")" : "INCORRECT: UnwrapFloat(" + s[i] + ")"); - } catch(Exception E) { - System.out.println("EXCEPTION: UnwrapFloat(" + s[i] + ")"); - } - - try { - System.out.println(PrimlibInterface.unwrapDouble(o[i]) == i ? "CONVERTED: UnwrapDouble(" + s[i] + ")" : "INCORRECT: UnwrapDouble(" + s[i] + ")"); - } catch(Exception E) { - System.out.println("EXCEPTION: UnwrapDouble(" + s[i] + ")"); - } - } - } -} - -class PrimlibInterface { - static native boolean unwrapBoolean(Object o); - static native byte unwrapByte(Object o); - static native short unwrapShort(Object o); - static native char unwrapChar(Object o); - static native int unwrapInt(Object o); - static native long unwrapLong(Object o); - static native float unwrapFloat(Object o); - static native double unwrapDouble(Object o); - - static native Boolean wrapBoolean(boolean val); - static native Byte wrapByte(byte val); - static native Short wrapShort(short val); - static native Character wrapChar(char val); - static native Integer wrapInt(int val); - static native Long wrapLong(long val); - static native Float wrapFloat(float val); - static native Double wrapDouble(double val); -} |