summaryrefslogtreecommitdiff
path: root/cppe/test
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2006-02-10 18:58:53 +0000
committerDwayne Boone <dwayne@zeroc.com>2006-02-10 18:58:53 +0000
commit983e8c7da953d27ed8524eb4865c3caa8f981f4e (patch)
treea28d38d71787834f9c3988321ffa05cedb365b1b /cppe/test
parentFixed Double marshalling for ARM/LINUX (diff)
downloadice-983e8c7da953d27ed8524eb4865c3caa8f981f4e.tar.bz2
ice-983e8c7da953d27ed8524eb4865c3caa8f981f4e.tar.xz
ice-983e8c7da953d27ed8524eb4865c3caa8f981f4e.zip
Added test to operations test to check double marshalling
Diffstat (limited to 'cppe/test')
-rw-r--r--cppe/test/IceE/operations/Test.ice2
-rw-r--r--cppe/test/IceE/operations/TestI.cpp11
-rw-r--r--cppe/test/IceE/operations/TestI.h2
-rw-r--r--cppe/test/IceE/operations/Twoways.cpp6
4 files changed, 21 insertions, 0 deletions
diff --git a/cppe/test/IceE/operations/Test.ice b/cppe/test/IceE/operations/Test.ice
index fe297ab1a88..50d2cb09f19 100644
--- a/cppe/test/IceE/operations/Test.ice
+++ b/cppe/test/IceE/operations/Test.ice
@@ -146,6 +146,8 @@ class MyClass
void opByteSOneway(ByteS s);
StringStringD opContext();
+
+ void opDoubleMarshaling(double p1, DoubleS p2);
};
class MyDerivedClass extends MyClass
diff --git a/cppe/test/IceE/operations/TestI.cpp b/cppe/test/IceE/operations/TestI.cpp
index dbd5615edf0..98e9d26da29 100644
--- a/cppe/test/IceE/operations/TestI.cpp
+++ b/cppe/test/IceE/operations/TestI.cpp
@@ -359,6 +359,17 @@ MyDerivedClassI::opContext(const Ice::Current& c)
return c.ctx;
}
+void
+MyDerivedClassI::opDoubleMarshaling(Ice::Double p1, const Test::DoubleS& p2, const Ice::Current&)
+{
+ Ice::Double d = 1278312346.0 / 13.0;
+ test(p1 == d);
+ for(unsigned int i = 0; i < p2.size(); ++i)
+ {
+ test(p2[i] == d);
+ }
+}
+
void
MyDerivedClassI::opDerived(const Ice::Current&)
{
diff --git a/cppe/test/IceE/operations/TestI.h b/cppe/test/IceE/operations/TestI.h
index 2a014968098..4757800be18 100644
--- a/cppe/test/IceE/operations/TestI.h
+++ b/cppe/test/IceE/operations/TestI.h
@@ -152,6 +152,8 @@ public:
virtual Ice::Context opContext(const Ice::Current&);
+ virtual void opDoubleMarshaling(Ice::Double, const Test::DoubleS&, const Ice::Current&);
+
virtual void opDerived(const Ice::Current&);
private:
diff --git a/cppe/test/IceE/operations/Twoways.cpp b/cppe/test/IceE/operations/Twoways.cpp
index d5d780131d2..1e7c58fdb67 100644
--- a/cppe/test/IceE/operations/Twoways.cpp
+++ b/cppe/test/IceE/operations/Twoways.cpp
@@ -685,4 +685,10 @@ twoways(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
communicator->setDefaultContext(Ice::Context());
}
}
+
+ {
+ Ice::Double d = 1278312346.0 / 13.0;
+ Test::DoubleS ds(5, d);
+ p->opDoubleMarshaling(d, ds);
+ }
}