2003-11-13 Tom Fitzsimmons <fitzsim@redhat.com>
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 Nov 2003 01:43:14 +0000 (01:43 +0000)
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 Nov 2003 01:43:14 +0000 (01:43 +0000)
* libjava.jni/jniutf.c: New file.
* libjava.jni/jniutf.java: New file.
* libjava.jni/jniutf.out: New file.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73569 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/testsuite/ChangeLog
libjava/testsuite/libjava.jni/jniutf.c [new file with mode: 0644]
libjava/testsuite/libjava.jni/jniutf.java [new file with mode: 0644]
libjava/testsuite/libjava.jni/jniutf.out [new file with mode: 0644]

index 0b9aef5..5cd4912 100644 (file)
@@ -1,3 +1,9 @@
+2003-11-13  Tom Fitzsimmons  <fitzsim@redhat.com>
+
+       * libjava.jni/jniutf.c: New file.
+       * libjava.jni/jniutf.java: New file.
+       * libjava.jni/jniutf.out: New file.
+
 2003-11-11  Tom Tromey  <tromey@redhat.com>
 
        For PR java/12915:
diff --git a/libjava/testsuite/libjava.jni/jniutf.c b/libjava/testsuite/libjava.jni/jniutf.c
new file mode 100644 (file)
index 0000000..1ccc7ea
--- /dev/null
@@ -0,0 +1,10 @@
+#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.java b/libjava/testsuite/libjava.jni/jniutf.java
new file mode 100644 (file)
index 0000000..e03e16e
--- /dev/null
@@ -0,0 +1,16 @@
+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
new file mode 100644 (file)
index 0000000..e69de29