summaryrefslogtreecommitdiff
path: root/csharp/test
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2015-11-19 00:07:54 +0100
committerJose <jose@zeroc.com>2015-11-19 00:07:54 +0100
commit3be880f1d7bf57deac92aff2a9844e85e4573c09 (patch)
tree5bc9443d4a8ccf004c809bb638fc690949e4fb89 /csharp/test
parentRemoved old monotonic clock links (diff)
downloadice-3be880f1d7bf57deac92aff2a9844e85e4573c09.tar.bz2
ice-3be880f1d7bf57deac92aff2a9844e85e4573c09.tar.xz
ice-3be880f1d7bf57deac92aff2a9844e85e4573c09.zip
Fixed bug in Java/C# class data member generated patcher
Diffstat (limited to 'csharp/test')
-rw-r--r--csharp/test/Ice/objects/AllTests.cs26
-rw-r--r--csharp/test/Ice/objects/InitialI.cs10
-rw-r--r--csharp/test/Ice/objects/Test.ice32
3 files changed, 68 insertions, 0 deletions
diff --git a/csharp/test/Ice/objects/AllTests.cs b/csharp/test/Ice/objects/AllTests.cs
index bae0fac3c72..2a80f162240 100644
--- a/csharp/test/Ice/objects/AllTests.cs
+++ b/csharp/test/Ice/objects/AllTests.cs
@@ -216,6 +216,32 @@ public class AllTests : TestCommon.TestApp
I h = initial.getH();
test(h != null && ((H)h) != null);
WriteLine("ok");
+
+ Write("getting D1... ");
+ Flush();
+ D1 d1 = new D1(new A1("a1"), new A1("a2"), new A1("a3"), new A1("a4"));
+ d1 = initial.getD1(d1);
+ test(d1.a1.name.Equals("a1"));
+ test(d1.a2.name.Equals("a2"));
+ test(d1.a3.name.Equals("a3"));
+ test(d1.a4.name.Equals("a4"));
+ WriteLine("ok");
+
+ Write("throw EDerived... ");
+ Flush();
+ try
+ {
+ initial.throwEDerived();
+ test(false);
+ }
+ catch(EDerived ederived)
+ {
+ test(ederived.a1.name.Equals("a1"));
+ test(ederived.a2.name.Equals("a2"));
+ test(ederived.a3.name.Equals("a3"));
+ test(ederived.a4.name.Equals("a4"));
+ }
+ WriteLine("ok");
Write("setting I... ");
Flush();
diff --git a/csharp/test/Ice/objects/InitialI.cs b/csharp/test/Ice/objects/InitialI.cs
index 2ea6ca9f14f..2c575a0f254 100644
--- a/csharp/test/Ice/objects/InitialI.cs
+++ b/csharp/test/Ice/objects/InitialI.cs
@@ -88,6 +88,16 @@ public sealed class InitialI : Initial
{
return new HI();
}
+
+ public override D1 getD1(D1 d1, Ice.Current current)
+ {
+ return d1;
+ }
+
+ public override void throwEDerived(Ice.Current current)
+ {
+ throw new EDerived(new A1("a1"), new A1("a2"), new A1("a3"), new A1("a4"));
+ }
public override void setI(I theI, Ice.Current current)
{
diff --git a/csharp/test/Ice/objects/Test.ice b/csharp/test/Ice/objects/Test.ice
index abbc1b87dc2..ef8b1dca759 100644
--- a/csharp/test/Ice/objects/Test.ice
+++ b/csharp/test/Ice/objects/Test.ice
@@ -135,6 +135,35 @@ exception Ex
};
+class A1
+{
+ string name;
+};
+
+class B1
+{
+ A1 a1;
+ A1 a2;
+};
+
+class D1 extends B1
+{
+ A1 a3;
+ A1 a4;
+};
+
+exception EBase
+{
+ A1 a1;
+ A1 a2;
+};
+
+exception EDerived extends EBase
+{
+ A1 a3;
+ A1 a4;
+};
+
class Initial
{
void shutdown();
@@ -151,6 +180,9 @@ class Initial
I getJ();
I getH();
+ D1 getD1(D1 d1);
+ void throwEDerived() throws EDerived;
+
void setI(I theI);
BaseSeq opBaseSeq(BaseSeq inSeq, out BaseSeq outSeq);