diff options
author | Michi Henning <michi@zeroc.com> | 2005-05-19 01:35:24 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2005-05-19 01:35:24 +0000 |
commit | 74237da6b56ff3f38351d791fe402f6f6d9bbe9d (patch) | |
tree | f5d8d805ec55abe614bbde51ecf5f818068e81ca /java/test/Ice/slicing/exceptions/csrc/AllTests.java | |
parent | ixed bug in initializeWithProperties() introduced by merge from (diff) | |
download | ice-74237da6b56ff3f38351d791fe402f6f6d9bbe9d.tar.bz2 ice-74237da6b56ff3f38351d791fe402f6f6d9bbe9d.tar.xz ice-74237da6b56ff3f38351d791fe402f6f6d9bbe9d.zip |
Fixed http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=324.
Diffstat (limited to 'java/test/Ice/slicing/exceptions/csrc/AllTests.java')
-rw-r--r-- | java/test/Ice/slicing/exceptions/csrc/AllTests.java | 52 |
1 files changed, 13 insertions, 39 deletions
diff --git a/java/test/Ice/slicing/exceptions/csrc/AllTests.java b/java/test/Ice/slicing/exceptions/csrc/AllTests.java index dff102d48c9..5ba4d44cc87 100644 --- a/java/test/Ice/slicing/exceptions/csrc/AllTests.java +++ b/java/test/Ice/slicing/exceptions/csrc/AllTests.java @@ -644,22 +644,20 @@ public class AllTests System.out.print("base... "); System.out.flush(); { - boolean gotException = false; try { test.baseAsBase(); + test(false); } catch(Base b) { test(b.b.equals("Base.b")); test(b.ice_name().equals("Test::Base")); - gotException = true; } catch(Exception ex) { test(false); } - test(gotException); } System.out.println("ok"); @@ -675,22 +673,20 @@ public class AllTests System.out.print("slicing of unknown derived... "); System.out.flush(); { - boolean gotException = false; try { test.unknownDerivedAsBase(); + test(false); } catch(Base b) { test(b.b.equals("UnknownDerived.b")); test(b.ice_name().equals("Test::Base")); - gotException = true; } catch(Exception ex) { test(false); } - test(gotException); } System.out.println("ok"); @@ -706,23 +702,21 @@ public class AllTests System.out.print("non-slicing of known derived as base... "); System.out.flush(); { - boolean gotException = false; try { test.knownDerivedAsBase(); + test(false); } catch(KnownDerived k) { test(k.b.equals("KnownDerived.b")); test(k.kd.equals("KnownDerived.kd")); test(k.ice_name().equals("Test::KnownDerived")); - gotException = true; } catch(Exception ex) { test(false); } - test(gotException); } System.out.println("ok"); @@ -738,23 +732,21 @@ public class AllTests System.out.print("non-slicing of known derived as derived... "); System.out.flush(); { - boolean gotException = false; try { test.knownDerivedAsKnownDerived(); + test(false); } catch(KnownDerived k) { test(k.b.equals("KnownDerived.b")); test(k.kd.equals("KnownDerived.kd")); test(k.ice_name().equals("Test::KnownDerived")); - gotException = true; } catch(Exception ex) { test(false); } - test(gotException); } System.out.println("ok"); @@ -770,22 +762,20 @@ public class AllTests System.out.print("slicing of unknown intermediate as base... "); System.out.flush(); { - boolean gotException = false; try { test.unknownIntermediateAsBase(); + test(false); } catch(Base b) { test(b.b.equals("UnknownIntermediate.b")); test(b.ice_name().equals("Test::Base")); - gotException = true; } catch(Exception ex) { test(false); } - test(gotException); } System.out.println("ok"); @@ -801,23 +791,21 @@ public class AllTests System.out.print("slicing of known intermediate as base... "); System.out.flush(); { - boolean gotException = false; try { test.knownIntermediateAsBase(); + test(false); } catch(KnownIntermediate ki) { test(ki.b.equals("KnownIntermediate.b")); test(ki.ki.equals("KnownIntermediate.ki")); test(ki.ice_name().equals("Test::KnownIntermediate")); - gotException = true; } catch(Exception ex) { test(false); } - test(gotException); } System.out.println("ok"); @@ -833,10 +821,10 @@ public class AllTests System.out.print("slicing of known most derived as base... "); System.out.flush(); { - boolean gotException = false; try { test.knownMostDerivedAsBase(); + test(false); } catch(KnownMostDerived kmd) { @@ -844,13 +832,11 @@ public class AllTests test(kmd.ki.equals("KnownMostDerived.ki")); test(kmd.kmd.equals("KnownMostDerived.kmd")); test(kmd.ice_name().equals("Test::KnownMostDerived")); - gotException = true; } catch(Exception ex) { test(false); } - test(gotException); } System.out.println("ok"); @@ -866,23 +852,21 @@ public class AllTests System.out.print("non-slicing of known intermediate as intermediate... "); System.out.flush(); { - boolean gotException = false; try { test.knownIntermediateAsKnownIntermediate(); + test(false); } catch(KnownIntermediate ki) { test(ki.b.equals("KnownIntermediate.b")); test(ki.ki.equals("KnownIntermediate.ki")); test(ki.ice_name().equals("Test::KnownIntermediate")); - gotException = true; } catch(Exception ex) { test(false); } - test(gotException); } System.out.println("ok"); @@ -898,10 +882,10 @@ public class AllTests System.out.print("non-slicing of known most derived as intermediate... "); System.out.flush(); { - boolean gotException = false; try { test.knownMostDerivedAsKnownIntermediate(); + test(false); } catch(KnownMostDerived kmd) { @@ -909,13 +893,11 @@ public class AllTests test(kmd.ki.equals("KnownMostDerived.ki")); test(kmd.kmd.equals("KnownMostDerived.kmd")); test(kmd.ice_name().equals("Test::KnownMostDerived")); - gotException = true; } catch(Exception ex) { test(false); } - test(gotException); } System.out.println("ok"); @@ -931,10 +913,10 @@ public class AllTests System.out.print("non-slicing of known most derived as most derived... "); System.out.flush(); { - boolean gotException = false; try { test.knownMostDerivedAsKnownMostDerived(); + test(false); } catch(KnownMostDerived kmd) { @@ -942,13 +924,11 @@ public class AllTests test(kmd.ki.equals("KnownMostDerived.ki")); test(kmd.kmd.equals("KnownMostDerived.kmd")); test(kmd.ice_name().equals("Test::KnownMostDerived")); - gotException = true; } catch(Exception ex) { test(false); } - test(gotException); } System.out.println("ok"); @@ -964,23 +944,21 @@ public class AllTests System.out.print("slicing of unknown most derived, known intermediate as base... "); System.out.flush(); { - boolean gotException = false; try { test.unknownMostDerived1AsBase(); + test(false); } catch(KnownIntermediate ki) { test(ki.b.equals("UnknownMostDerived1.b")); test(ki.ki.equals("UnknownMostDerived1.ki")); test(ki.ice_name().equals("Test::KnownIntermediate")); - gotException = true; } catch(Exception ex) { test(false); } - test(gotException); } System.out.println("ok"); @@ -996,23 +974,21 @@ public class AllTests System.out.print("slicing of unknown most derived, known intermediate as intermediate... "); System.out.flush(); { - boolean gotException = false; try { test.unknownMostDerived1AsKnownIntermediate(); + test(false); } catch(KnownIntermediate ki) { test(ki.b.equals("UnknownMostDerived1.b")); test(ki.ki.equals("UnknownMostDerived1.ki")); test(ki.ice_name().equals("Test::KnownIntermediate")); - gotException = true; } catch(Exception ex) { test(false); } - test(gotException); } System.out.println("ok"); @@ -1029,22 +1005,20 @@ public class AllTests System.out.print("slicing of unknown most derived, unknown intermediate thrown as base... "); System.out.flush(); { - boolean gotException = false; try { test.unknownMostDerived2AsBase(); + test(false); } catch(Base b) { test(b.b.equals("UnknownMostDerived2.b")); test(b.ice_name().equals("Test::Base")); - gotException = true; } catch(Exception ex) { test(false); } - test(gotException); } System.out.println("ok"); |