Signed-off-by: Tomek Grabiec <[email protected]>
---
regression/jvm/ExceptionsTest.java | 35 +++++++++++++++++++++++++++++++++++
1 files changed, 35 insertions(+), 0 deletions(-)
diff --git a/regression/jvm/ExceptionsTest.java
b/regression/jvm/ExceptionsTest.java
index b82db1c..26105fd 100644
--- a/regression/jvm/ExceptionsTest.java
+++ b/regression/jvm/ExceptionsTest.java
@@ -114,11 +114,46 @@ public class ExceptionsTest extends TestCase {
assertEquals(section, 2);
}
+ public static RuntimeException a;
+ public static RuntimeException b;
+
+ public static void throwA() {
+ a = new RuntimeException();
+ throw a;
+ }
+
+ public static void throwB() {
+ b = new RuntimeException();
+ throw b;
+ }
+
+ public static void testNestedTryCatch() {
+ try {
+ throwA();
+ } catch (Exception _a) {
+ try {
+ throwB();
+ } catch (Exception _b) {
+ assertEquals(b, _b);
+ }
+
+ assertEquals(a, _a);
+ }
+ }
+
+ public static void testEmptyCatchBlock() {
+ try {
+ throw new Exception();
+ } catch (Exception e) {}
+ }
+
public static void main(String args[]) {
testCatchCompilation();
testThrowAndCatchInTheSameMethod();
testUnwinding();
testMultipleCatchBlocks();
+ testNestedTryCatch();
+ testEmptyCatchBlock();
Runtime.getRuntime().halt(retval);
}
--
1.6.0.6
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Jatovm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jatovm-devel