diff options
-rw-r--r-- | cpp/test/Ice/slicing/exceptions/AllTests.cpp | 13 | ||||
-rw-r--r-- | java/test/Ice/slicing/exceptions/ServerTest.ice | 40 | ||||
-rw-r--r-- | java/test/Ice/slicing/exceptions/build.xml | 43 | ||||
-rw-r--r-- | java/test/Ice/slicing/exceptions/csrc/AllTests.java (renamed from java/test/Ice/slicing/exceptions/AllTests.java) | 13 | ||||
-rw-r--r-- | java/test/Ice/slicing/exceptions/csrc/Client.java (renamed from java/test/Ice/slicing/exceptions/Client.java) | 0 | ||||
-rwxr-xr-x | java/test/Ice/slicing/exceptions/run.py | 4 | ||||
-rw-r--r-- | java/test/Ice/slicing/exceptions/ssrc/Server.java (renamed from java/test/Ice/slicing/exceptions/Server.java) | 0 | ||||
-rw-r--r-- | java/test/Ice/slicing/exceptions/ssrc/TestI.java (renamed from java/test/Ice/slicing/exceptions/TestI.java) | 0 |
8 files changed, 59 insertions, 54 deletions
diff --git a/cpp/test/Ice/slicing/exceptions/AllTests.cpp b/cpp/test/Ice/slicing/exceptions/AllTests.cpp index 83142e8139c..6aa4269054b 100644 --- a/cpp/test/Ice/slicing/exceptions/AllTests.cpp +++ b/cpp/test/Ice/slicing/exceptions/AllTests.cpp @@ -34,6 +34,7 @@ allTests(const Ice::CommunicatorPtr& communicator) catch(const Base& b) { test(b.b == "Base.b"); + test(b.ice_name() == "Base"); gotException = true; } catch(...) @@ -54,6 +55,7 @@ allTests(const Ice::CommunicatorPtr& communicator) catch(const Base& b) { test(b.b == "UnknownDerived.b"); + test(b.ice_name() == "Base"); gotException = true; } catch(...) @@ -75,6 +77,7 @@ allTests(const Ice::CommunicatorPtr& communicator) { test(k.b == "KnownDerived.b"); test(k.kd == "KnownDerived.kd"); + test(k.ice_name() == "KnownDerived"); gotException = true; } catch(...) @@ -96,6 +99,7 @@ allTests(const Ice::CommunicatorPtr& communicator) { test(k.b == "KnownDerived.b"); test(k.kd == "KnownDerived.kd"); + test(k.ice_name() == "KnownDerived"); gotException = true; } catch(...) @@ -116,6 +120,7 @@ allTests(const Ice::CommunicatorPtr& communicator) catch(const Base& b) { test(b.b == "UnknownIntermediate.b"); + test(b.ice_name() == "Base"); gotException = true; } catch(...) @@ -137,6 +142,7 @@ allTests(const Ice::CommunicatorPtr& communicator) { test(ki.b == "KnownIntermediate.b"); test(ki.ki == "KnownIntermediate.ki"); + test(ki.ice_name() == "KnownIntermediate"); gotException = true; } catch(...) @@ -159,6 +165,7 @@ allTests(const Ice::CommunicatorPtr& communicator) test(kmd.b == "KnownMostDerived.b"); test(kmd.ki == "KnownMostDerived.ki"); test(kmd.kmd == "KnownMostDerived.kmd"); + test(kmd.ice_name() == "KnownMostDerived"); gotException = true; } catch(...) @@ -180,6 +187,7 @@ allTests(const Ice::CommunicatorPtr& communicator) { test(ki.b == "KnownIntermediate.b"); test(ki.ki == "KnownIntermediate.ki"); + test(ki.ice_name() == "KnownIntermediate"); gotException = true; } catch(...) @@ -202,6 +210,7 @@ allTests(const Ice::CommunicatorPtr& communicator) test(kmd.b == "KnownMostDerived.b"); test(kmd.ki == "KnownMostDerived.ki"); test(kmd.kmd == "KnownMostDerived.kmd"); + test(kmd.ice_name() == "KnownMostDerived"); gotException = true; } catch(...) @@ -224,6 +233,7 @@ allTests(const Ice::CommunicatorPtr& communicator) test(kmd.b == "KnownMostDerived.b"); test(kmd.ki == "KnownMostDerived.ki"); test(kmd.kmd == "KnownMostDerived.kmd"); + test(kmd.ice_name() == "KnownMostDerived"); gotException = true; } catch(...) @@ -245,6 +255,7 @@ allTests(const Ice::CommunicatorPtr& communicator) { test(ki.b == "UnknownMostDerived1.b"); test(ki.ki == "UnknownMostDerived1.ki"); + test(ki.ice_name() == "KnownIntermediate"); gotException = true; } catch(...) @@ -267,6 +278,7 @@ allTests(const Ice::CommunicatorPtr& communicator) { test(ki.b == "UnknownMostDerived1.b"); test(ki.ki == "UnknownMostDerived1.ki"); + test(ki.ice_name() == "KnownIntermediate"); gotException = true; } catch(...) @@ -287,6 +299,7 @@ allTests(const Ice::CommunicatorPtr& communicator) catch(const Base& b) { test(b.b == "UnknownMostDerived2.b"); + test(b.ice_name() == "Base"); gotException = true; } catch(...) diff --git a/java/test/Ice/slicing/exceptions/ServerTest.ice b/java/test/Ice/slicing/exceptions/ServerTest.ice deleted file mode 100644 index e626b9c76c8..00000000000 --- a/java/test/Ice/slicing/exceptions/ServerTest.ice +++ /dev/null @@ -1,40 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003 -// ZeroC, Inc. -// Billerica, MA, USA -// -// All Rights Reserved. -// -// Ice is free software; you can redistribute it and/or modify it under -// the terms of the GNU General Public License version 2 as published by -// the Free Software Foundation. -// -// ********************************************************************** - -#ifndef SERVERTEST_ICE -#define SERVERTEST_ICE - -#include <ClientTest.ice> - -exception UnknownDerived extends Base -{ - string ud; -}; - -exception UnknownIntermediate extends Base -{ - string ui; -}; - -exception UnknownMostDerived1 extends KnownIntermediate -{ - string umd1; -}; - -exception UnknownMostDerived2 extends UnknownIntermediate -{ - string umd2; -}; - -#endif diff --git a/java/test/Ice/slicing/exceptions/build.xml b/java/test/Ice/slicing/exceptions/build.xml index 1899b777f40..aaf10486623 100644 --- a/java/test/Ice/slicing/exceptions/build.xml +++ b/java/test/Ice/slicing/exceptions/build.xml @@ -11,13 +11,20 @@ the terms of the GNU General Public License version 2 as published by the Free Software Foundation. --> -<project name="test_Ice_slicing_exceptions" default="all" basedir="."> +<project name="test_Ice_slicing_objects" default="all" basedir="."> <!-- set global properties for this build --> <property name="top.dir" value="../../../.."/> <property name="lib.dir" value="${top.dir}/lib"/> - <property name="class.dir" value="classes"/> - <property name="generated.dir" value="generated"/> + <property name="cclass.dir" value="cclasses"/> + <property name="sclass.dir" value="sclasses"/> + <property name="cgen.dir" value="cgenerated"/> + <property name="sgen.dir" value="sgenerated"/> + <property name="csrc.dir" value="csrc"/> + <property name="ssrc.dir" value="ssrc"/> + + <!-- set common build properties for this build --> + <property file="${top.dir}/config/build.properties"/> <!-- set common build properties for this build --> <property file="${top.dir}/config/build.properties"/> @@ -33,8 +40,15 @@ the Free Software Foundation. <target name="generate" depends="init"> <!-- Create the output directory for generated code --> - <mkdir dir="${generated.dir}"/> - <slice2java outputdir="${generated.dir}"> + <mkdir dir="${cgen.dir}"/> + <slice2java outputdir="${cgen.dir}"> + <includepath> + <pathelement path="."/> + </includepath> + <fileset dir="." includes="ClientTest.ice"/> + </slice2java> + <mkdir dir="${sgen.dir}"/> + <slice2java outputdir="${sgen.dir}"> <includepath> <pathelement path="."/> </includepath> @@ -43,18 +57,25 @@ the Free Software Foundation. </target> <target name="compile" depends="generate"> - <mkdir dir="${class.dir}"/> - <javac srcdir="${generated.dir}" destdir="${class.dir}" + <mkdir dir="${cclass.dir}"/> + <javac srcdir="${cgen.dir}" destdir="${cclass.dir}" + source="1.4" classpath="${lib.dir}" debug="${debug}"/> + <javac srcdir="${csrc.dir}" destdir="${cclass.dir}" source="1.4" + classpath="${lib.dir}" excludes="${cgen.dir}/**" debug="${debug}"/> + <mkdir dir="${sclass.dir}"/> + <javac srcdir="${sgen.dir}" destdir="${sclass.dir}" source="1.4" classpath="${lib.dir}" debug="${debug}"/> - <javac srcdir="." destdir="${class.dir}" source="1.4" - classpath="${lib.dir}" excludes="generated/**" debug="${debug}"/> + <javac srcdir="${ssrc.dir}" destdir="${sclass.dir}" source="1.4" + classpath="${lib.dir}" excludes="${sgen.dir}/**" debug="${debug}"/> </target> <target name="all" depends="compile"/> <target name="clean"> - <delete dir="${generated.dir}"/> - <delete dir="${class.dir}"/> + <delete dir="${cgen.dir}"/> + <delete dir="${sgen.dir}"/> + <delete dir="${cclass.dir}"/> + <delete dir="${sclass.dir}"/> </target> </project> diff --git a/java/test/Ice/slicing/exceptions/AllTests.java b/java/test/Ice/slicing/exceptions/csrc/AllTests.java index 8a7216b655f..c35685e5a5e 100644 --- a/java/test/Ice/slicing/exceptions/AllTests.java +++ b/java/test/Ice/slicing/exceptions/csrc/AllTests.java @@ -51,6 +51,7 @@ public class AllTests catch(Base b) { test(b.b.equals("Base.b")); + test(b.ice_name().equals("Base")); gotException = true; } catch(Exception ex) @@ -72,6 +73,7 @@ public class AllTests catch(Base b) { test(b.b.equals("UnknownDerived.b")); + test(b.ice_name().equals("Base")); gotException = true; } catch(Exception ex) @@ -94,6 +96,7 @@ public class AllTests { test(k.b.equals("KnownDerived.b")); test(k.kd.equals("KnownDerived.kd")); + test(k.ice_name().equals("KnownDerived")); gotException = true; } catch(Exception ex) @@ -116,6 +119,7 @@ public class AllTests { test(k.b.equals("KnownDerived.b")); test(k.kd.equals("KnownDerived.kd")); + test(k.ice_name().equals("KnownDerived")); gotException = true; } catch(Exception ex) @@ -137,6 +141,7 @@ public class AllTests catch(Base b) { test(b.b.equals("UnknownIntermediate.b")); + test(b.ice_name().equals("Base")); gotException = true; } catch(Exception ex) @@ -159,6 +164,7 @@ public class AllTests { test(ki.b.equals("KnownIntermediate.b")); test(ki.ki.equals("KnownIntermediate.ki")); + test(ki.ice_name().equals("KnownIntermediate")); gotException = true; } catch(Exception ex) @@ -182,6 +188,7 @@ public class AllTests test(kmd.b.equals("KnownMostDerived.b")); test(kmd.ki.equals("KnownMostDerived.ki")); test(kmd.kmd.equals("KnownMostDerived.kmd")); + test(kmd.ice_name().equals("KnownMostDerived")); gotException = true; } catch(Exception ex) @@ -204,6 +211,7 @@ public class AllTests { test(ki.b.equals("KnownIntermediate.b")); test(ki.ki.equals("KnownIntermediate.ki")); + test(ki.ice_name().equals("KnownIntermediate")); gotException = true; } catch(Exception ex) @@ -227,6 +235,7 @@ public class AllTests test(kmd.b.equals("KnownMostDerived.b")); test(kmd.ki.equals("KnownMostDerived.ki")); test(kmd.kmd.equals("KnownMostDerived.kmd")); + test(kmd.ice_name().equals("KnownMostDerived")); gotException = true; } catch(Exception ex) @@ -250,6 +259,7 @@ public class AllTests test(kmd.b.equals("KnownMostDerived.b")); test(kmd.ki.equals("KnownMostDerived.ki")); test(kmd.kmd.equals("KnownMostDerived.kmd")); + test(kmd.ice_name().equals("KnownMostDerived")); gotException = true; } catch(Exception ex) @@ -272,6 +282,7 @@ public class AllTests { test(ki.b.equals("UnknownMostDerived1.b")); test(ki.ki.equals("UnknownMostDerived1.ki")); + test(ki.ice_name().equals("KnownIntermediate")); gotException = true; } catch(Exception ex) @@ -294,6 +305,7 @@ public class AllTests { test(ki.b.equals("UnknownMostDerived1.b")); test(ki.ki.equals("UnknownMostDerived1.ki")); + test(ki.ice_name().equals("KnownIntermediate")); gotException = true; } catch(Exception ex) @@ -315,6 +327,7 @@ public class AllTests catch(Base b) { test(b.b.equals("UnknownMostDerived2.b")); + test(b.ice_name().equals("Base")); gotException = true; } catch(Exception ex) diff --git a/java/test/Ice/slicing/exceptions/Client.java b/java/test/Ice/slicing/exceptions/csrc/Client.java index 4c1e80e9947..4c1e80e9947 100644 --- a/java/test/Ice/slicing/exceptions/Client.java +++ b/java/test/Ice/slicing/exceptions/csrc/Client.java diff --git a/java/test/Ice/slicing/exceptions/run.py b/java/test/Ice/slicing/exceptions/run.py index 035d478bbd1..94ace071e25 100755 --- a/java/test/Ice/slicing/exceptions/run.py +++ b/java/test/Ice/slicing/exceptions/run.py @@ -28,8 +28,6 @@ import TestUtil name = os.path.join("Ice", "slicing", "exceptions") testdir = os.path.join(toplevel, "test", name) -classpath = os.getenv("CLASSPATH", "") -os.environ["CLASSPATH"] = os.path.join(testdir, "classes") + TestUtil.sep + classpath -TestUtil.clientServerTest() +TestUtil.clientServerTestWithClasspath(os.path.join(testdir, "sclasses"), os.path.join(testdir, "cclasses")) sys.exit(0) diff --git a/java/test/Ice/slicing/exceptions/Server.java b/java/test/Ice/slicing/exceptions/ssrc/Server.java index 6402c74685f..6402c74685f 100644 --- a/java/test/Ice/slicing/exceptions/Server.java +++ b/java/test/Ice/slicing/exceptions/ssrc/Server.java diff --git a/java/test/Ice/slicing/exceptions/TestI.java b/java/test/Ice/slicing/exceptions/ssrc/TestI.java index 86eb89f5885..86eb89f5885 100644 --- a/java/test/Ice/slicing/exceptions/TestI.java +++ b/java/test/Ice/slicing/exceptions/ssrc/TestI.java |