summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2015-01-06 11:21:38 -0330
committerDwayne Boone <dwayne@zeroc.com>2015-01-06 11:21:38 -0330
commit351e5741cfb37030e3da09066567844a6803ada4 (patch)
treef95267ab4af094032271112ee4a6852b058856ca
parentICE-6216 gradle plugin uses iceHome to locate slice compilers (diff)
downloadice-351e5741cfb37030e3da09066567844a6803ada4.tar.bz2
ice-351e5741cfb37030e3da09066567844a6803ada4.tar.xz
ice-351e5741cfb37030e3da09066567844a6803ada4.zip
ICE-6253 added tests to ensure Functional_TwowayCallback* used
-rw-r--r--cpp/test/Ice/ami/Test.ice4
-rw-r--r--cpp/test/Ice/ami/TestI.cpp10
-rw-r--r--cpp/test/Ice/ami/TestI.h2
-rw-r--r--cs/test/Ice/ami/Test.ice4
-rw-r--r--cs/test/Ice/ami/TestI.cs10
-rw-r--r--java/test/src/main/java/test/Ice/ami/AMI.java26
-rw-r--r--java/test/src/main/java/test/Ice/ami/Test.ice11
-rw-r--r--java/test/src/main/java/test/Ice/ami/TestI.java48
-rw-r--r--java/test/src/main/java/test/Ice/operations/Test.ice16
-rw-r--r--js/test/Ice/ami/Test.ice4
-rw-r--r--py/test/Ice/ami/Test.ice2
-rw-r--r--py/test/Ice/ami/TestI.py3
12 files changed, 123 insertions, 17 deletions
diff --git a/cpp/test/Ice/ami/Test.ice b/cpp/test/Ice/ami/Test.ice
index ec9a6bdc0f3..8a75cf016ab 100644
--- a/cpp/test/Ice/ami/Test.ice
+++ b/cpp/test/Ice/ami/Test.ice
@@ -25,7 +25,7 @@ interface TestIntf
void opWithPayload(Ice::ByteSeq seq);
int opWithResult();
void opWithUE()
- throws TestIntfException;
+ throws TestIntfException;
void opBatch();
void opWithArgs(out int one, out int two, out int three, out int four, out int five, out int six, out int seven,
@@ -34,6 +34,8 @@ interface TestIntf
bool waitForBatch(int count);
void close(bool force);
void shutdown();
+
+ bool supportsFunctionalTests();
};
interface TestIntfController
diff --git a/cpp/test/Ice/ami/TestI.cpp b/cpp/test/Ice/ami/TestI.cpp
index a29b3699294..e418621289d 100644
--- a/cpp/test/Ice/ami/TestI.cpp
+++ b/cpp/test/Ice/ami/TestI.cpp
@@ -98,18 +98,24 @@ TestIntfI::shutdown(const Ice::Current& current)
current.adapter->getCommunicator()->shutdown();
}
+bool
+TestIntfI::supportsFunctionalTests(const Ice::Current&)
+{
+ return false;
+}
+
void
TestIntfControllerI::holdAdapter(const Ice::Current&)
{
_adapter->hold();
}
-
+
void
TestIntfControllerI::resumeAdapter(const Ice::Current&)
{
_adapter->activate();
}
-
+
TestIntfControllerI::TestIntfControllerI(const Ice::ObjectAdapterPtr& adapter) : _adapter(adapter)
{
}
diff --git a/cpp/test/Ice/ami/TestI.h b/cpp/test/Ice/ami/TestI.h
index 4d5ad7b217e..b47d7be0d53 100644
--- a/cpp/test/Ice/ami/TestI.h
+++ b/cpp/test/Ice/ami/TestI.h
@@ -33,6 +33,8 @@ public:
virtual void close(bool, const Ice::Current&);
virtual void shutdown(const Ice::Current&);
+ virtual bool supportsFunctionalTests(const Ice::Current&);
+
private:
int _batchCount;
diff --git a/cs/test/Ice/ami/Test.ice b/cs/test/Ice/ami/Test.ice
index a75d1ce573a..e5613fe9f94 100644
--- a/cs/test/Ice/ami/Test.ice
+++ b/cs/test/Ice/ami/Test.ice
@@ -24,12 +24,14 @@ interface TestIntf
void opWithPayload(Ice::ByteSeq seq);
int opWithResult();
void opWithUE()
- throws TestIntfException;
+ throws TestIntfException;
void opBatch();
int opBatchCount();
bool waitForBatch(int count);
void close(bool force);
void shutdown();
+
+ bool supportsFunctionalTests();
};
interface TestIntfController
diff --git a/cs/test/Ice/ami/TestI.cs b/cs/test/Ice/ami/TestI.cs
index d32d0fea5f9..7c24b7f7c3a 100644
--- a/cs/test/Ice/ami/TestI.cs
+++ b/cs/test/Ice/ami/TestI.cs
@@ -84,6 +84,12 @@ public class TestI : TestIntfDisp_
current.adapter.getCommunicator().shutdown();
}
+ override public bool
+ supportsFunctionalTests(Ice.Current current)
+ {
+ return false;
+ }
+
private int _batchCount;
}
@@ -94,13 +100,13 @@ public class TestControllerI : TestIntfControllerDisp_
{
_adapter.hold();
}
-
+
override public void
resumeAdapter(Ice.Current current)
{
_adapter.activate();
}
-
+
public
TestControllerI(Ice.ObjectAdapter adapter)
{
diff --git a/java/test/src/main/java/test/Ice/ami/AMI.java b/java/test/src/main/java/test/Ice/ami/AMI.java
index b3c71c98e51..6a1e709f66b 100644
--- a/java/test/src/main/java/test/Ice/ami/AMI.java
+++ b/java/test/src/main/java/test/Ice/ami/AMI.java
@@ -679,6 +679,30 @@ public class AMI
catch(TestIntfException ex)
{
}
+
+ if(p.supportsFunctionalTests())
+ {
+ result = p.begin_opBool(true);
+ test(p.end_opBool(result));
+
+ result = p.begin_opByte((byte)0xff);
+ test(p.end_opByte(result) == (byte)0xff);
+
+ result = p.begin_opShort(Short.MIN_VALUE);
+ test(p.end_opShort(result) == Short.MIN_VALUE);
+
+ result = p.begin_opInt(Integer.MIN_VALUE);
+ test(p.end_opInt(result) == Integer.MIN_VALUE);
+
+ result = p.begin_opLong(Long.MIN_VALUE);
+ test(p.end_opLong(result) == Long.MIN_VALUE);
+
+ result = p.begin_opFloat(3.14f);
+ test(p.end_opFloat(result) == 3.14f);
+
+ result = p.begin_opDouble(1.1E10);
+ test(p.end_opDouble(result) == 1.1E10);
+ }
}
out.println("ok");
@@ -1177,7 +1201,7 @@ public class AMI
Ice.ObjectPrx o = ic.stringToProxy(p.toString());
TestIntfPrx p2 = TestIntfPrxHelper.checkedCast(o);
ic.destroy();
-
+
try
{
p2.begin_op();
diff --git a/java/test/src/main/java/test/Ice/ami/Test.ice b/java/test/src/main/java/test/Ice/ami/Test.ice
index 65736a9ae03..0bc8819b366 100644
--- a/java/test/src/main/java/test/Ice/ami/Test.ice
+++ b/java/test/src/main/java/test/Ice/ami/Test.ice
@@ -26,12 +26,21 @@ interface TestIntf
void opWithPayload(Ice::ByteSeq seq);
int opWithResult();
void opWithUE()
- throws TestIntfException;
+ throws TestIntfException;
void opBatch();
int opBatchCount();
bool waitForBatch(int count);
void close(bool force);
void shutdown();
+
+ bool supportsFunctionalTests();
+ bool opBool(bool b);
+ byte opByte(byte b);
+ short opShort(short s);
+ int opInt(int i);
+ long opLong(long l);
+ float opFloat(float f);
+ double opDouble(double d);
};
interface TestIntfController
diff --git a/java/test/src/main/java/test/Ice/ami/TestI.java b/java/test/src/main/java/test/Ice/ami/TestI.java
index 9f23ce27401..b4de0455264 100644
--- a/java/test/src/main/java/test/Ice/ami/TestI.java
+++ b/java/test/src/main/java/test/Ice/ami/TestI.java
@@ -61,6 +61,54 @@ public class TestI extends _TestIntfDisp
}
@Override
+ public boolean supportsFunctionalTests(Ice.Current current)
+ {
+ return true;
+ }
+
+ @Override
+ public boolean opBool(boolean b, Ice.Current current)
+ {
+ return b;
+ }
+
+ @Override
+ public byte opByte(byte b, Ice.Current current)
+ {
+ return b;
+ }
+
+ @Override
+ public short opShort(short s, Ice.Current current)
+ {
+ return s;
+ }
+
+ @Override
+ public int opInt(int i, Ice.Current current)
+ {
+ return i;
+ }
+
+ @Override
+ public long opLong(long l, Ice.Current current)
+ {
+ return l;
+ }
+
+ @Override
+ public float opFloat(float f, Ice.Current current)
+ {
+ return f;
+ }
+
+ @Override
+ public double opDouble(double d, Ice.Current current)
+ {
+ return d;
+ }
+
+ @Override
public synchronized boolean
waitForBatch(int count, Ice.Current current)
{
diff --git a/java/test/src/main/java/test/Ice/operations/Test.ice b/java/test/src/main/java/test/Ice/operations/Test.ice
index c510d56067d..bf1b6a1c075 100644
--- a/java/test/src/main/java/test/Ice/operations/Test.ice
+++ b/java/test/src/main/java/test/Ice/operations/Test.ice
@@ -108,30 +108,30 @@ class MyClass
out ByteS p3);
BoolS opBoolS(BoolS p1, BoolS p2,
- out BoolS p3);
+ out BoolS p3);
LongS opShortIntLongS(Test::ShortS p1, IntS p2, LongS p3,
out ::Test::ShortS p4, out IntS p5, out LongS p6);
DoubleS opFloatDoubleS(FloatS p1, DoubleS p2,
out FloatS p3, out DoubleS p4);
-
+
StringS opStringS(StringS p1, StringS p2,
out StringS p3);
-
+
ByteSS opByteSS(ByteSS p1, ByteSS p2,
out ByteSS p3);
-
+
BoolSS opBoolSS(BoolSS p1, BoolSS p2,
out BoolSS p3);
-
+
LongSS opShortIntLongSS(ShortSS p1, IntSS p2, LongSS p3,
out ShortSS p4, out IntSS p5, out LongSS p6);
-
-
+
+
DoubleSS opFloatDoubleSS(FloatSS p1, DoubleSS p2,
out FloatSS p3, out DoubleSS p4);
-
+
StringSS opStringSS(StringSS p1, StringSS p2,
out StringSS p3);
diff --git a/js/test/Ice/ami/Test.ice b/js/test/Ice/ami/Test.ice
index 2ec388d144c..be1205d41e4 100644
--- a/js/test/Ice/ami/Test.ice
+++ b/js/test/Ice/ami/Test.ice
@@ -25,12 +25,14 @@ interface TestIntf
void opWithPayload(Ice::ByteSeq seq);
int opWithResult();
void opWithUE()
- throws TestIntfException;
+ throws TestIntfException;
void opBatch();
int opBatchCount();
bool waitForBatch(int count);
void close(bool force);
void shutdown();
+
+ bool supportsFunctionalTests();
};
interface TestIntfController
diff --git a/py/test/Ice/ami/Test.ice b/py/test/Ice/ami/Test.ice
index d88be87af06..1bf95e7798f 100644
--- a/py/test/Ice/ami/Test.ice
+++ b/py/test/Ice/ami/Test.ice
@@ -31,6 +31,8 @@ interface TestIntf
bool waitForBatch(int count);
void close(bool force);
void shutdown();
+
+ bool supportsFunctionalTests();
};
interface TestIntfController
diff --git a/py/test/Ice/ami/TestI.py b/py/test/Ice/ami/TestI.py
index bf645822d6f..c1f7642220a 100644
--- a/py/test/Ice/ami/TestI.py
+++ b/py/test/Ice/ami/TestI.py
@@ -58,6 +58,9 @@ class TestIntfI(Test.TestIntf):
def shutdown(self, current=None):
current.adapter.getCommunicator().shutdown()
+ def supportsFunctionalTests(self, current=None):
+ return False
+
class TestIntfControllerI(Test.TestIntfController):
def __init__(self, adapter):
self._adapter = adapter