summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/custom/AllTests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/Ice/custom/AllTests.cpp')
-rw-r--r--cpp/test/Ice/custom/AllTests.cpp1476
1 files changed, 2 insertions, 1474 deletions
diff --git a/cpp/test/Ice/custom/AllTests.cpp b/cpp/test/Ice/custom/AllTests.cpp
index 32a8c7c93be..0dd933cd77a 100644
--- a/cpp/test/Ice/custom/AllTests.cpp
+++ b/cpp/test/Ice/custom/AllTests.cpp
@@ -83,1006 +83,6 @@ private:
bool _called;
};
-class AMI_TestIntf_opDoubleArrayI : public Test::AMI_TestIntf_opDoubleArray, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opDoubleArrayI(const ::std::pair<const double*, const double*>& in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const ::std::pair<const double*, const double*>& ret,
- const ::std::pair<const double*, const double*>& out)
- {
- test(arrayRangeEquals<double>(out, _in));
- test(arrayRangeEquals<double>(ret, _in));
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- const ::std::pair<const double*, const double*> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opDoubleArrayI> AMI_TestIntf_opDoubleArrayIPtr;
-
-class AMI_TestIntf_opBoolArrayI : public Test::AMI_TestIntf_opBoolArray, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opBoolArrayI(const ::std::pair<const bool*, const bool*>& in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const ::std::pair<const bool*, const bool*>& ret,
- const ::std::pair<const bool*, const bool*>& out)
- {
- test(arrayRangeEquals<bool>(out, _in));
- test(arrayRangeEquals<bool>(ret, _in));
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- const ::std::pair<const bool*, const bool*> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opBoolArrayI> AMI_TestIntf_opBoolArrayIPtr;
-
-class AMI_TestIntf_opByteArrayI : public Test::AMI_TestIntf_opByteArray, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opByteArrayI(const pair<const Ice::Byte*, const Ice::Byte*>& in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const pair<const Ice::Byte*, const Ice::Byte*>& ret,
- const pair<const Ice::Byte*, const Ice::Byte*>& out)
- {
- test(arrayRangeEquals<Ice::Byte>(out, _in));
- test(arrayRangeEquals<Ice::Byte>(ret, _in));
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- pair<const Ice::Byte*, const Ice::Byte*> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opByteArrayI> AMI_TestIntf_opByteArrayIPtr;
-
-class AMI_TestIntf_opVariableArrayI : public Test::AMI_TestIntf_opVariableArray, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opVariableArrayI(pair<const Test::Variable*, const Test::Variable*> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const pair<const Test::Variable*, const Test::Variable*>& ret,
- const pair<const Test::Variable*, const Test::Variable*>& out)
- {
- test(arrayRangeEquals<Test::Variable>(out, _in));
- test(arrayRangeEquals<Test::Variable>(ret, _in));
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- pair<const Test::Variable*, const Test::Variable*> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opVariableArrayI> AMI_TestIntf_opVariableArrayIPtr;
-
-class AMI_TestIntf_opBoolRangeI : public Test::AMI_TestIntf_opBoolRange, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opBoolRangeI(pair<Test::BoolSeq::const_iterator, Test::BoolSeq::const_iterator> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const pair<Test::BoolSeq::const_iterator, Test::BoolSeq::const_iterator>& ret,
- const pair<Test::BoolSeq::const_iterator, Test::BoolSeq::const_iterator>& out)
- {
- test(equal(out.first, out.second, _in.first));
- test(equal(ret.first, ret.second, _in.first));
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- pair<Test::BoolSeq::const_iterator, Test::BoolSeq::const_iterator> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opBoolRangeI> AMI_TestIntf_opBoolRangeIPtr;
-
-class AMI_TestIntf_opByteRangeI : public Test::AMI_TestIntf_opByteRange, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opByteRangeI(const pair<Test::ByteList::const_iterator, Test::ByteList::const_iterator>& in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const pair<Test::ByteList::const_iterator, Test::ByteList::const_iterator>& ret,
- const pair<Test::ByteList::const_iterator, Test::ByteList::const_iterator>& out)
- {
- test(equal(out.first, out.second, _in.first));
- test(equal(ret.first, ret.second, _in.first));
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- pair<Test::ByteList::const_iterator, Test::ByteList::const_iterator> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opByteRangeI> AMI_TestIntf_opByteRangeIPtr;
-
-class AMI_TestIntf_opVariableRangeI : public Test::AMI_TestIntf_opVariableRange, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opVariableRangeI(const pair<Test::VariableList::const_iterator,
- Test::VariableList::const_iterator>& in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const pair<Test::VariableList::const_iterator, Test::VariableList::const_iterator>& ret,
- const pair<Test::VariableList::const_iterator, Test::VariableList::const_iterator>& out)
- {
- test(equal(out.first, out.second, _in.first));
- test(equal(ret.first, ret.second, _in.first));
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- pair<Test::VariableList::const_iterator, Test::VariableList::const_iterator> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opVariableRangeI> AMI_TestIntf_opVariableRangeIPtr;
-
-class AMI_TestIntf_opBoolRangeTypeI : public Test::AMI_TestIntf_opBoolRangeType, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opBoolRangeTypeI(const pair<const bool*, const bool*>& in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const pair<const bool*, const bool*>& ret,
- const pair<const bool*, const bool*>& out)
- {
- test(arrayRangeEquals<bool>(out, _in));
- test(arrayRangeEquals<bool>(ret, _in));
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- pair<const bool*, const bool*> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opBoolRangeTypeI> AMI_TestIntf_opBoolRangeTypeIPtr;
-
-class AMI_TestIntf_opByteRangeTypeI : public Test::AMI_TestIntf_opByteRangeType, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opByteRangeTypeI(const pair<Test::ByteList::const_iterator, Test::ByteList::const_iterator>& in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const pair<Test::ByteList::const_iterator, Test::ByteList::const_iterator>& ret,
- const pair<Test::ByteList::const_iterator, Test::ByteList::const_iterator>& out)
- {
- test(equal(out.first, out.second, _in.first));
- test(equal(ret.first, ret.second, _in.first));
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- pair<Test::ByteList::const_iterator, Test::ByteList::const_iterator> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opByteRangeTypeI> AMI_TestIntf_opByteRangeTypeIPtr;
-
-class AMI_TestIntf_opVariableRangeTypeI : public Test::AMI_TestIntf_opVariableRangeType, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opVariableRangeTypeI(const pair<deque<Test::Variable>::const_iterator,
- deque<Test::Variable>::const_iterator>& in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const pair<deque<Test::Variable>::const_iterator,
- deque<Test::Variable>::const_iterator>& ret,
- const pair<deque<Test::Variable>::const_iterator,
- deque<Test::Variable>::const_iterator>& out)
- {
- test(equal(out.first, out.second, _in.first));
- test(equal(ret.first, ret.second, _in.first));
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- pair<deque<Test::Variable>::const_iterator, deque<Test::Variable>::const_iterator> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opVariableRangeTypeI> AMI_TestIntf_opVariableRangeTypeIPtr;
-
-class AMI_TestIntf_opBoolSeqI : public Test::AMI_TestIntf_opBoolSeq, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opBoolSeqI(deque<bool> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const deque<bool>& ret, const deque<bool>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- deque<bool> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opBoolSeqI> AMI_TestIntf_opBoolSeqIPtr;
-
-class AMI_TestIntf_opBoolListI : public Test::AMI_TestIntf_opBoolList, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opBoolListI(list<bool> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const list<bool>& ret, const list<bool>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- list<bool> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opBoolListI> AMI_TestIntf_opBoolListIPtr;
-
-class AMI_TestIntf_opByteSeqI : public Test::AMI_TestIntf_opByteSeq, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opByteSeqI(deque<Ice::Byte> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const deque<Ice::Byte>& ret, const deque<Ice::Byte>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- deque<Ice::Byte> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opByteSeqI> AMI_TestIntf_opByteSeqIPtr;
-
-class AMI_TestIntf_opByteListI : public Test::AMI_TestIntf_opByteList, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opByteListI(list<Ice::Byte> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const list<Ice::Byte>& ret, const list<Ice::Byte>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- list<Ice::Byte> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opByteListI> AMI_TestIntf_opByteListIPtr;
-
-class AMI_TestIntf_opMyByteSeqI : public Test::AMI_TestIntf_opMyByteSeq, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opMyByteSeqI(MyByteSeq in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const MyByteSeq& ret, const MyByteSeq& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- MyByteSeq _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opMyByteSeqI> AMI_TestIntf_opMyByteSeqIPtr;
-
-class AMI_TestIntf_opStringSeqI : public Test::AMI_TestIntf_opStringSeq, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opStringSeqI(deque<string> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const deque<string>& ret, const deque<string>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- deque<string> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opStringSeqI> AMI_TestIntf_opStringSeqIPtr;
-
-class AMI_TestIntf_opStringListI : public Test::AMI_TestIntf_opStringList, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opStringListI(list<string> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const list<string>& ret, const list<string>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- list<string> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opStringListI> AMI_TestIntf_opStringListIPtr;
-
-class AMI_TestIntf_opFixedSeqI : public Test::AMI_TestIntf_opFixedSeq, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opFixedSeqI(deque<Test::Fixed> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const deque<Test::Fixed>& ret, const deque<Test::Fixed>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- deque<Test::Fixed> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opFixedSeqI> AMI_TestIntf_opFixedSeqIPtr;
-
-class AMI_TestIntf_opFixedListI : public Test::AMI_TestIntf_opFixedList, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opFixedListI(list<Test::Fixed> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const list<Test::Fixed>& ret, const list<Test::Fixed>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- list<Test::Fixed> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opFixedListI> AMI_TestIntf_opFixedListIPtr;
-
-class AMI_TestIntf_opVariableSeqI : public Test::AMI_TestIntf_opVariableSeq, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opVariableSeqI(deque<Test::Variable> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const deque<Test::Variable>& ret, const deque<Test::Variable>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- deque<Test::Variable> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opVariableSeqI> AMI_TestIntf_opVariableSeqIPtr;
-
-class AMI_TestIntf_opVariableListI : public Test::AMI_TestIntf_opVariableList, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opVariableListI(list<Test::Variable> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const list<Test::Variable>& ret, const list<Test::Variable>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- list<Test::Variable> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opVariableListI> AMI_TestIntf_opVariableListIPtr;
-
-class AMI_TestIntf_opStringStringDictSeqI : public Test::AMI_TestIntf_opStringStringDictSeq, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opStringStringDictSeqI(deque<Test::StringStringDict> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const deque<Test::StringStringDict>& ret, const deque<Test::StringStringDict>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- deque<Test::StringStringDict> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opStringStringDictSeqI> AMI_TestIntf_opStringStringDictSeqIPtr;
-
-class AMI_TestIntf_opStringStringDictListI : public Test::AMI_TestIntf_opStringStringDictList, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opStringStringDictListI(list<Test::StringStringDict> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const list<Test::StringStringDict>& ret, const list<Test::StringStringDict>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- list<Test::StringStringDict> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opStringStringDictListI> AMI_TestIntf_opStringStringDictListIPtr;
-
-class AMI_TestIntf_opESeqI : public Test::AMI_TestIntf_opESeq, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opESeqI(deque<Test::E> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const deque<Test::E>& ret, const deque<Test::E>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- deque<Test::E> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opESeqI> AMI_TestIntf_opESeqIPtr;
-
-class AMI_TestIntf_opEListI : public Test::AMI_TestIntf_opEList, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opEListI(list<Test::E> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const list<Test::E>& ret, const list<Test::E>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- list<Test::E> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opEListI> AMI_TestIntf_opEListIPtr;
-
-class AMI_TestIntf_opCPrxSeqI : public Test::AMI_TestIntf_opCPrxSeq, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opCPrxSeqI(deque<Test::CPrx> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const deque<Test::CPrx>& ret, const deque<Test::CPrx>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- deque<Test::CPrx> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opCPrxSeqI> AMI_TestIntf_opCPrxSeqIPtr;
-
-class AMI_TestIntf_opCPrxListI : public Test::AMI_TestIntf_opCPrxList, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opCPrxListI(list<Test::CPrx> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const list<Test::CPrx>& ret, const list<Test::CPrx>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- list<Test::CPrx> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opCPrxListI> AMI_TestIntf_opCPrxListIPtr;
-
-class AMI_TestIntf_opCSeqI : public Test::AMI_TestIntf_opCSeq, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opCSeqI(deque<Test::CPtr> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const deque<Test::CPtr>& ret, const deque<Test::CPtr>& out)
- {
- test(out.size() == _in.size());
- test(ret.size() == _in.size());
- for(unsigned int i = 1; i < _in.size(); ++i)
- {
- test(out[i] == out[0]);
- test(ret[i] == out[i]);
- }
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- deque<Test::CPtr> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opCSeqI> AMI_TestIntf_opCSeqIPtr;
-
-class AMI_TestIntf_opCListI : public Test::AMI_TestIntf_opCList, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opCListI(list<Test::CPtr> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const list<Test::CPtr>& ret, const list<Test::CPtr>& out)
- {
- test(out.size() == _in.size());
- test(ret.size() == _in.size());
- list<Test::CPtr>::const_iterator p1;
- list<Test::CPtr>::const_iterator p2;
- for(p1 = out.begin(), p2 = ret.begin(); p1 != out.end(); ++p1, ++p2)
- {
- test(*p1 == *p2);
- }
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- list<Test::CPtr> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opCListI> AMI_TestIntf_opCListIPtr;
-
-class AMI_TestIntf_opClassStructI : public Test::AMI_TestIntf_opClassStruct, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opClassStructI(const Test::ClassStructPtr& cs, const Test::ClassStructSeq& csseq1) :
- _cs(cs), _csseq1(csseq1)
- {
- }
-
- virtual void ice_response(const ::Test::ClassStructPtr& ret,
- const ::Test::ClassStructPtr& cs1,
- const ::Test::ClassStructSeq& seq)
- {
- test(ret == _cs);
- test(cs1 == _cs);
- test(seq == _csseq1);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- const Test::ClassStructPtr _cs;
- const Test::ClassStructSeq _csseq1;
-};
-typedef IceUtil::Handle<AMI_TestIntf_opClassStructI> AMI_TestIntf_opClassStructIPtr;
-
-class AMI_Test1_opStringI : public Test1::AMI_WstringClass_opString, public CallbackBase
-{
-public:
-
- AMI_Test1_opStringI(wstring in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const wstring& ret, const wstring& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- wstring _in;
-};
-
-typedef IceUtil::Handle<AMI_Test1_opStringI> AMI_Test1_opStringIPtr;
-
-class AMI_Test2_opStringI : public Test2::AMI_WstringClass_opString, public CallbackBase
-{
-public:
-
- AMI_Test2_opStringI(wstring in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const wstring& ret, const wstring& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- wstring _in;
-};
-
-typedef IceUtil::Handle<AMI_Test2_opStringI> AMI_Test2_opStringIPtr;
-
-class AMI_Test1_throwExceptI : public Test1::AMI_WstringClass_throwExcept, public CallbackBase
-{
-public:
-
- AMI_Test1_throwExceptI(wstring in)
- : _in(in)
- {
- }
-
- virtual void ice_response()
- {
- test(false);
- }
-
- virtual void ice_exception(const ::Ice::Exception& ex)
- {
- try
- {
- ex.ice_throw();
- }
- catch(const Test1::WstringException& e)
- {
- test(e.reason == _in);
- called();
- }
- catch(...)
- {
- test(false);
- }
- }
-
-private:
-
- wstring _in;
-};
-
-typedef IceUtil::Handle<AMI_Test1_throwExceptI> AMI_Test1_throwExceptIPtr;
-
-class AMI_Test2_throwExceptI : public Test2::AMI_WstringClass_throwExcept, public CallbackBase
-{
-public:
-
- AMI_Test2_throwExceptI(wstring in)
- : _in(in)
- {
- }
-
- virtual void ice_response()
- {
- test(false);
- }
-
- virtual void ice_exception(const ::Ice::Exception& ex)
- {
- try
- {
- ex.ice_throw();
- }
- catch(const Test2::WstringException& e)
- {
- test(e.reason == _in);
- called();
- }
- catch(...)
- {
- test(false);
- }
- }
-
-private:
-
- wstring _in;
-};
-
-typedef IceUtil::Handle<AMI_Test2_throwExceptI> AMI_Test2_throwExceptIPtr;
-
class InParam : public Ice::LocalObject
{
};
@@ -2227,452 +1227,8 @@ allTests(const Ice::CommunicatorPtr& communicator)
test(rs == rs2);
}
cout << "ok" << endl;
-
- cout << "testing alternate sequences with AMI... " << flush;
-
- {
- Test::DoubleSeq in(5);
- in[0] = 3.14;
- in[1] = 1 / 3;
- in[2] = 0.375;
- in[3] = 4 / 3;
- in[4] = -5.725;
- Ice::Double inArray[5];
- for(int i = 0; i < 5; ++i)
- {
- inArray[i] = in[i];
- }
- pair<const Ice::Double*, const Ice::Double*> inPair(inArray, inArray + 5);
-
- AMI_TestIntf_opDoubleArrayIPtr cb = new AMI_TestIntf_opDoubleArrayI(inPair);
- t->opDoubleArray_async(cb, inPair);
- cb->check();
- }
-
- {
- Test::BoolSeq in(5);
- in[0] = false;
- in[1] = true;
- in[2] = true;
- in[3] = false;
- in[4] = true;
- bool inArray[5];
- for(int i = 0; i < 5; ++i)
- {
- inArray[i] = in[i];
- }
- pair<const bool*, const bool*> inPair(inArray, inArray + 5);
-
- AMI_TestIntf_opBoolArrayIPtr cb = new AMI_TestIntf_opBoolArrayI(inPair);
- t->opBoolArray_async(cb, inPair);
- cb->check();
- }
-
- {
- Ice::Byte in[5];
- in[0] = '1';
- in[1] = '2';
- in[2] = '3';
- in[3] = '4';
- in[4] = '5';
- pair<const Ice::Byte*, const Ice::Byte*> inPair(in, in + 5);
-
- AMI_TestIntf_opByteArrayIPtr cb = new AMI_TestIntf_opByteArrayI(inPair);
- t->opByteArray_async(cb, inPair);
- cb->check();
- }
-
- {
- Test::VariableList in;
- Test::Variable inArray[5];
- inArray[0].s = "These";
- in.push_back(inArray[0]);
- inArray[1].s = "are";
- in.push_back(inArray[1]);
- inArray[2].s = "five";
- in.push_back(inArray[2]);
- inArray[3].s = "short";
- in.push_back(inArray[3]);
- inArray[4].s = "strings.";
- in.push_back(inArray[4]);
- pair<const Test::Variable*, const Test::Variable*> inPair(inArray, inArray + 5);
-
- AMI_TestIntf_opVariableArrayIPtr cb = new AMI_TestIntf_opVariableArrayI(inPair);
- t->opVariableArray_async(cb, inPair);
- cb->check();
- }
-
- {
- Test::BoolSeq in(5);
- in[0] = false;
- in[1] = true;
- in[2] = true;
- in[3] = false;
- in[4] = true;
- pair<Test::BoolSeq::const_iterator, Test::BoolSeq::const_iterator> inPair(in.begin(), in.end());
-
- AMI_TestIntf_opBoolRangeIPtr cb = new AMI_TestIntf_opBoolRangeI(inPair);
- t->opBoolRange_async(cb, inPair);
- cb->check();
- }
-
- {
- Test::ByteList in;
- in.push_back('1');
- in.push_back('2');
- in.push_back('3');
- in.push_back('4');
- in.push_back('5');
- pair<Test::ByteList::const_iterator, Test::ByteList::const_iterator> inPair(in.begin(), in.end());
-
- AMI_TestIntf_opByteRangeIPtr cb = new AMI_TestIntf_opByteRangeI(inPair);
- t->opByteRange_async(cb, inPair);
- cb->check();
- }
-
- {
- Test::VariableList in;
- Test::Variable v;
- v.s = "These";
- in.push_back(v);
- v.s = "are";
- in.push_back(v);
- v.s = "five";
- in.push_back(v);
- v.s = "short";
- in.push_back(v);
- v.s = "strings.";
- in.push_back(v);
- pair<Test::VariableList::const_iterator, Test::VariableList::const_iterator> inPair(in.begin(), in.end());
-
- AMI_TestIntf_opVariableRangeIPtr cb = new AMI_TestIntf_opVariableRangeI(inPair);
- t->opVariableRange_async(cb, inPair);
- cb->check();
- }
-
- {
- Test::BoolSeq in(5);
- in[0] = false;
- in[1] = true;
- in[2] = true;
- in[3] = false;
- in[4] = true;
- bool inArray[5];
- for(int i = 0; i < 5; ++i)
- {
- inArray[i] = in[i];
- }
- pair<const bool*, const bool*> inPair(inArray, inArray + 5);
-
- AMI_TestIntf_opBoolRangeTypeIPtr cb = new AMI_TestIntf_opBoolRangeTypeI(inPair);
- t->opBoolRangeType_async(cb, inPair);
- cb->check();
- }
-
- {
- Test::ByteList in;
- in.push_back('1');
- in.push_back('2');
- in.push_back('3');
- in.push_back('4');
- in.push_back('5');
- pair<Test::ByteList::const_iterator, Test::ByteList::const_iterator> inPair(in.begin(), in.end());
-
- AMI_TestIntf_opByteRangeTypeIPtr cb = new AMI_TestIntf_opByteRangeTypeI(inPair);
- t->opByteRangeType_async(cb, inPair);
- cb->check();
- }
-
- {
- Test::VariableList in;
- deque<Test::Variable> inSeq;
- Test::Variable v;
- v.s = "These";
- in.push_back(v);
- inSeq.push_back(v);
- v.s = "are";
- in.push_back(v);
- inSeq.push_back(v);
- v.s = "five";
- in.push_back(v);
- inSeq.push_back(v);
- v.s = "short";
- in.push_back(v);
- inSeq.push_back(v);
- v.s = "strings.";
- in.push_back(v);
- inSeq.push_back(v);
- pair<deque<Test::Variable>::const_iterator, deque<Test::Variable>::const_iterator> inPair(inSeq.begin(),
- inSeq.end());
-
- AMI_TestIntf_opVariableRangeTypeIPtr cb = new AMI_TestIntf_opVariableRangeTypeI(inPair);
- t->opVariableRangeType_async(cb, inPair);
- cb->check();
- }
-
- {
- deque<bool> in(5);
- in[0] = false;
- in[1] = true;
- in[2] = true;
- in[3] = false;
- in[4] = true;
-
- AMI_TestIntf_opBoolSeqIPtr cb = new AMI_TestIntf_opBoolSeqI(in);
- t->opBoolSeq_async(cb, in);
- cb->check();
- }
-
- {
- list<bool> in;
- in.push_back(false);
- in.push_back(true);
- in.push_back(true);
- in.push_back(false);
- in.push_back(true);
-
- AMI_TestIntf_opBoolListIPtr cb = new AMI_TestIntf_opBoolListI(in);
- t->opBoolList_async(cb, in);
- cb->check();
- }
-
- {
- deque< ::Ice::Byte> in(5);
- in[0] = '1';
- in[1] = '2';
- in[2] = '3';
- in[3] = '4';
- in[4] = '5';
-
- AMI_TestIntf_opByteSeqIPtr cb = new AMI_TestIntf_opByteSeqI(in);
- t->opByteSeq_async(cb, in);
- cb->check();
- }
-
- {
- list< ::Ice::Byte> in;
- in.push_back('1');
- in.push_back('2');
- in.push_back('3');
- in.push_back('4');
- in.push_back('5');
-
- AMI_TestIntf_opByteListIPtr cb = new AMI_TestIntf_opByteListI(in);
- t->opByteList_async(cb, in);
- cb->check();
- }
-
- {
- MyByteSeq in(5);
- int i = 0;
- for(MyByteSeq::iterator p = in.begin(); p != in.end(); ++p)
- {
- *p = '1' + i++;
- }
-
- AMI_TestIntf_opMyByteSeqIPtr cb = new AMI_TestIntf_opMyByteSeqI(in);
- t->opMyByteSeq_async(cb, in);
- cb->check();
- }
-
- {
- deque<string> in(5);
- in[0] = "These";
- in[1] = "are";
- in[2] = "five";
- in[3] = "short";
- in[4] = "strings.";
-
- AMI_TestIntf_opStringSeqIPtr cb = new AMI_TestIntf_opStringSeqI(in);
- t->opStringSeq_async(cb, in);
- cb->check();
- }
-
- {
- list<string> in;
- in.push_back("These");
- in.push_back("are");
- in.push_back("five");
- in.push_back("short");
- in.push_back("strings.");
-
- AMI_TestIntf_opStringListIPtr cb = new AMI_TestIntf_opStringListI(in);
- t->opStringList_async(cb, in);
- cb->check();
- }
-
- {
- deque<Test::Fixed> in(5);
- in[0].s = 1;
- in[1].s = 2;
- in[2].s = 3;
- in[3].s = 4;
- in[4].s = 5;
-
- AMI_TestIntf_opFixedSeqIPtr cb = new AMI_TestIntf_opFixedSeqI(in);
- t->opFixedSeq_async(cb, in);
- cb->check();
- }
-
- {
- list<Test::Fixed> in(5);
- short num = 1;
- for(list<Test::Fixed>::iterator p = in.begin(); p != in.end(); ++p)
- {
- (*p).s = num++;
- }
-
- AMI_TestIntf_opFixedListIPtr cb = new AMI_TestIntf_opFixedListI(in);
- t->opFixedList_async(cb, in);
- cb->check();
- }
-
- {
- deque<Test::Variable> in(5);
- in[0].s = "These";
- in[1].s = "are";
- in[2].s = "five";
- in[3].s = "short";
- in[4].s = "strings.";
-
- AMI_TestIntf_opVariableSeqIPtr cb = new AMI_TestIntf_opVariableSeqI(in);
- t->opVariableSeq_async(cb, in);
- cb->check();
- }
-
- {
- list<Test::Variable> in;
- Test::Variable v;
- v.s = "These";
- in.push_back(v);
- v.s = "are";
- in.push_back(v);
- v.s = "five";
- in.push_back(v);
- v.s = "short";
- in.push_back(v);
- v.s = "strings.";
- in.push_back(v);
-
- AMI_TestIntf_opVariableListIPtr cb = new AMI_TestIntf_opVariableListI(in);
- t->opVariableList_async(cb, in);
- cb->check();
- }
-
- {
- deque<Test::StringStringDict> in(5);
- in[0]["A"] = "a";
- in[1]["B"] = "b";
- in[2]["C"] = "c";
- in[3]["D"] = "d";
- in[4]["E"] = "e";
-
- AMI_TestIntf_opStringStringDictSeqIPtr cb = new AMI_TestIntf_opStringStringDictSeqI(in);
- t->opStringStringDictSeq_async(cb, in);
- cb->check();
- }
-
- {
- list<Test::StringStringDict> in;
- Test::StringStringDict ssd;
- ssd["A"] = "a";
- in.push_back(ssd);
- ssd["B"] = "b";
- in.push_back(ssd);
- ssd["C"] = "c";
- in.push_back(ssd);
- ssd["D"] = "d";
- in.push_back(ssd);
- ssd["E"] = "e";
- in.push_back(ssd);
-
- AMI_TestIntf_opStringStringDictListIPtr cb = new AMI_TestIntf_opStringStringDictListI(in);
- t->opStringStringDictList_async(cb, in);
- cb->check();
- }
-
- {
- deque<Test::E> in(5);
- in[0] = Test::E1;
- in[1] = Test::E2;
- in[2] = Test::E3;
- in[3] = Test::E1;
- in[4] = Test::E3;
-
- AMI_TestIntf_opESeqIPtr cb = new AMI_TestIntf_opESeqI(in);
- t->opESeq_async(cb, in);
- cb->check();
- }
-
- {
- list<Test::E> in;
- in.push_back(Test::E1);
- in.push_back(Test::E2);
- in.push_back(Test::E3);
- in.push_back(Test::E1);
- in.push_back(Test::E3);
-
- AMI_TestIntf_opEListIPtr cb = new AMI_TestIntf_opEListI(in);
- t->opEList_async(cb, in);
- cb->check();
- }
-
- {
- deque<Test::CPrx> in(5);
- in[0] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C1:default -p 12010 -t 10000"));
- in[1] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C2:default -p 12010 -t 10001"));
- in[2] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C3:default -p 12010 -t 10002"));
- in[3] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C4:default -p 12010 -t 10003"));
- in[4] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C5:default -p 12010 -t 10004"));
-
- AMI_TestIntf_opCPrxSeqIPtr cb = new AMI_TestIntf_opCPrxSeqI(in);
- t->opCPrxSeq_async(cb, in);
- cb->check();
- }
-
- {
- list<Test::CPrx> in;
- in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C1:default -p 12010 -t 10000")));
- in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C2:default -p 12010 -t 10001")));
- in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C3:default -p 12010 -t 10002")));
- in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C4:default -p 12010 -t 10003")));
- in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C5:default -p 12010 -t 10004")));
-
- AMI_TestIntf_opCPrxListIPtr cb = new AMI_TestIntf_opCPrxListI(in);
- t->opCPrxList_async(cb, in);
- cb->check();
- }
-
- {
- deque<Test::CPtr> in(5);
- in[0] = new Test::C();
- in[1] = in[0];
- in[2] = in[0];
- in[3] = in[0];
- in[4] = in[0];
-
- AMI_TestIntf_opCSeqIPtr cb = new AMI_TestIntf_opCSeqI(in);
- t->opCSeq_async(cb, in);
- cb->check();
- }
-
- {
- list<Test::CPtr> in;
- in.push_back(new Test::C());
- in.push_back(new Test::C());
- in.push_back(new Test::C());
- in.push_back(new Test::C());
- in.push_back(new Test::C());
-
- AMI_TestIntf_opCListIPtr cb = new AMI_TestIntf_opCListI(in);
- t->opCList_async(cb, in);
- cb->check();
- }
-
- cout << "ok" << endl;
-
- cout << "testing alternate strings with new AMI... " << flush;
+ cout << "testing alternate strings with AMI... " << flush;
{
Util::string_view in = "Hello World!";
@@ -2685,7 +1241,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
}
cout << "ok" << endl;
- cout << "testing alternate sequences with new AMI... " << flush;
+ cout << "testing alternate sequences with AMI... " << flush;
{
{
Test::DoubleSeq in(5);
@@ -4758,14 +3314,6 @@ allTests(const Ice::CommunicatorPtr& communicator)
cout << "testing class mapped structs with AMI... " << flush;
{
- AMI_TestIntf_opClassStructIPtr cb = new AMI_TestIntf_opClassStructI(cs, csseq1);
- t->opClassStruct_async(cb, cs, csseq1);
- cb->check();
- }
- cout << "ok" << endl;
-
- cout << "testing class mapped structs with new AMI... " << flush;
- {
Test::ClassStructPtr cs2;
Test::ClassStructSeq csseq2;
Ice::AsyncResultPtr r = t->begin_opClassStruct(cs, csseq1);
@@ -4835,11 +3383,6 @@ allTests(const Ice::CommunicatorPtr& communicator)
test(ret == wstr);
{
- AMI_Test1_opStringIPtr cb = new AMI_Test1_opStringI(wstr);
- wsc1->opString_async(cb, wstr);
- cb->check();
- }
- {
Ice::AsyncResultPtr r = wsc1->begin_opString(wstr);
wstring out;
wstring ret = wsc1->end_opString(out, r);
@@ -4873,11 +3416,6 @@ allTests(const Ice::CommunicatorPtr& communicator)
test(ret == wstr);
{
- AMI_Test2_opStringIPtr cb = new AMI_Test2_opStringI(wstr);
- wsc2->opString_async(cb, wstr);
- cb->check();
- }
- {
Ice::AsyncResultPtr r = wsc2->begin_opString(wstr);
wstring out;
wstring ret = wsc2->end_opString(out, r);
@@ -4936,11 +3474,6 @@ allTests(const Ice::CommunicatorPtr& communicator)
}
{
- AMI_Test1_throwExceptIPtr cb = new AMI_Test1_throwExceptI(wstr);
- wsc1->throwExcept_async(cb, wstr);
- cb->check();
- }
- {
Ice::AsyncResultPtr r = wsc1->begin_throwExcept(wstr);
try
{
@@ -4979,11 +3512,6 @@ allTests(const Ice::CommunicatorPtr& communicator)
}
{
- AMI_Test2_throwExceptIPtr cb = new AMI_Test2_throwExceptI(wstr);
- wsc2->throwExcept_async(cb, wstr);
- cb->check();
- }
- {
Ice::AsyncResultPtr r = wsc2->begin_throwExcept(wstr);
try
{