Patch: fixes for JNI test cases

Tom Tromey tromey@cygnus.com
Thu Apr 20 12:48:00 GMT 2000


This patch fixes a couple bugs in the JNI test cases.

2000-04-20  Tom Tromey  <tromey@cygnus.com>

	* libjava.jni/throwit.out: Fixed output to be correct.

	* libjava.jni/noclass.java (main): `find_it' throws an exception.


Tom

Index: libjava.jni/noclass.java
===================================================================
RCS file: /cvs/java/libgcj/libjava/testsuite/libjava.jni/noclass.java,v
retrieving revision 1.1
diff -u -r1.1 noclass.java
--- noclass.java	2000/02/27 21:42:40	1.1
+++ noclass.java	2000/04/20 19:47:10
@@ -11,8 +11,15 @@
 
   public static void main (String[] args)
   {
-    find_it ();
-    // If find_it() causes a crash, we won't be running this next line.
-    System.out.println ("Ok");
+    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");
+      }
   }
 }
Index: libjava.jni/throwit.out
===================================================================
RCS file: /cvs/java/libgcj/libjava/testsuite/libjava.jni/throwit.out,v
retrieving revision 1.1
diff -u -r1.1 throwit.out
--- throwit.out	2000/02/16 22:39:36	1.1
+++ throwit.out	2000/04/20 19:47:10
@@ -1,4 +1,4 @@
 class java.lang.UnknownError
-the word is zardoz
-class java.lang.Throwable
 zardoz is the word
+class java.lang.Throwable
+the word is zardoz


More information about the Java-patches mailing list