* tests/regression/jasmin/test_nullpointerexception_monitorexit.j:
authoredwin <none@none>
Wed, 4 Oct 2006 18:35:37 +0000 (18:35 +0000)
committeredwin <none@none>
Wed, 4 Oct 2006 18:35:37 +0000 (18:35 +0000)
New test.

* tests/regression/jasmin/Makefile.am: Added
test_nullpointerexception_monitorexit.j.

tests/regression/jasmin/Makefile.am
tests/regression/jasmin/test_nullpointerexception_monitorexit.j [new file with mode: 0644]

index d0869df5d59c63b310db90006c781007f150c06e..a4fef5ec398405e3efb5aa69ce6f51b871dc7898 100644 (file)
@@ -56,6 +56,7 @@ JASMIN_TESTS = \
        $(srcdir)/test_many_monitors.j \
        $(srcdir)/test_no_store_load_conflict.j \
        $(srcdir)/test_no_store_store_conflict.j \
+       $(srcdir)/test_nullpointerexception_monitorexit.j \
        $(srcdir)/test_simple_load_store.j \
        $(srcdir)/test_store_load_conflict.j \
        $(srcdir)/test_store_store_conflict_2.j \
diff --git a/tests/regression/jasmin/test_nullpointerexception_monitorexit.j b/tests/regression/jasmin/test_nullpointerexception_monitorexit.j
new file mode 100644 (file)
index 0000000..1248dcc
--- /dev/null
@@ -0,0 +1,49 @@
+.class public test_nullpointerexception_monitorexit
+.super java/lang/Object
+
+; ======================================================================
+
+.method public <init>()V
+   aload_0
+   invokenonvirtual java/lang/Object/<init>()V
+   return
+.end method
+
+; ======================================================================
+
+.method public static check(I)V
+       .limit locals 1
+       .limit stack 10
+       getstatic java/lang/System/out Ljava/io/PrintStream;
+       iload_0
+       invokevirtual java/io/PrintStream/println(I)V
+       return
+.end method
+
+; ======================================================================
+
+.method public static main([Ljava/lang/String;)V
+       .limit stack 2
+       .limit locals 2
+
+       ldc 42
+       istore 1
+
+       aload 0
+       ifnull force_basic_block_boundary
+
+       ; --------------------------------------------------
+
+       aconst_null
+       monitorexit
+
+       ; --------------------------------------------------
+
+force_basic_block_boundary:
+
+       iload 1
+       invokestatic test_nullpointerexception_monitorexit/checkI(I)V
+       ; OUTPUT: 42
+
+       return
+.end method