diff options
author | Joe George <joe@zeroc.com> | 2015-12-08 11:33:42 -0500 |
---|---|---|
committer | Joe George <joe@zeroc.com> | 2015-12-08 16:09:24 -0500 |
commit | 6a43686ce26de5d2d5edf4a485ecff3a242c26b6 (patch) | |
tree | d31e4f16dc9ed6e28056a7224e045a4638955f5e /cpp/test | |
parent | C++11 mapping IceDiscovery plug-in (diff) | |
download | ice-6a43686ce26de5d2d5edf4a485ecff3a242c26b6.tar.bz2 ice-6a43686ce26de5d2d5edf4a485ecff3a242c26b6.tar.xz ice-6a43686ce26de5d2d5edf4a485ecff3a242c26b6.zip |
ICE-6908 - Add ValueFactory
ValueFactory is a replacement for ObjectFactory (which is still
available if needed). It is an interface with only one operation
and can has the "delegate" metadata.
Diffstat (limited to 'cpp/test')
-rw-r--r-- | cpp/test/Ice/exceptions/AllTests.cpp | 17 | ||||
-rw-r--r-- | cpp/test/Ice/objects/AllTests.cpp | 28 | ||||
-rw-r--r-- | cpp/test/Ice/objects/Client.cpp | 63 | ||||
-rw-r--r-- | cpp/test/Ice/objects/Collocated.cpp | 62 | ||||
-rw-r--r-- | cpp/test/Ice/objects/Server.cpp | 22 | ||||
-rw-r--r-- | cpp/test/Ice/optional/AllTests.cpp | 10 | ||||
-rw-r--r-- | cpp/test/Ice/slicing/objects/AllTests.cpp | 42 | ||||
-rw-r--r-- | cpp/test/Ice/stream/Client.cpp | 16 |
8 files changed, 153 insertions, 107 deletions
diff --git a/cpp/test/Ice/exceptions/AllTests.cpp b/cpp/test/Ice/exceptions/AllTests.cpp index 562fb63a935..55eaa81147e 100644 --- a/cpp/test/Ice/exceptions/AllTests.cpp +++ b/cpp/test/Ice/exceptions/AllTests.cpp @@ -39,12 +39,13 @@ public: #endif }; -class ObjectFactoryI : virtual public Ice::ObjectFactory +#ifndef ICE_CPP11_MAPPING // C++98 +class ValueFactoryI : virtual public Ice::ValueFactory { public: virtual Ice::ObjectPtr create(const string&) { return 0; } - virtual void destroy() {} }; +#endif class CallbackBase : public IceUtil::Monitor<IceUtil::Mutex> { @@ -634,10 +635,10 @@ allTests(const Ice::CommunicatorPtr& communicator) } cout << "ok" << endl; - cout << "testing object factory registration exception... " << flush; + cout << "testing value factory registration exception... " << flush; { #ifdef ICE_CPP11_MAPPING - communicator->addObjectFactory( + communicator->addValueFactory( [](const std::string&) { return nullptr; @@ -645,7 +646,7 @@ allTests(const Ice::CommunicatorPtr& communicator) "x"); try { - communicator->addObjectFactory( + communicator->addValueFactory( [](const std::string&) { return nullptr; @@ -657,11 +658,11 @@ allTests(const Ice::CommunicatorPtr& communicator) { } #else - Ice::ObjectFactoryPtr of = new ObjectFactoryI; - communicator->addObjectFactory(of, "x"); + Ice::ValueFactoryPtr vf = new ValueFactoryI; + communicator->addValueFactory(vf, "x"); try { - communicator->addObjectFactory(of, "x"); + communicator->addValueFactory(vf, "x"); test(false); } catch(const Ice::AlreadyRegisteredException&) diff --git a/cpp/test/Ice/objects/AllTests.cpp b/cpp/test/Ice/objects/AllTests.cpp index c1115c698c2..6b7437f20c9 100644 --- a/cpp/test/Ice/objects/AllTests.cpp +++ b/cpp/test/Ice/objects/AllTests.cpp @@ -17,8 +17,8 @@ using namespace Test; class AbstractBaseI : public AbstractBase { public: - - virtual void op(const Ice::Current&) + + virtual void op(const Ice::Current&) {} }; @@ -98,7 +98,7 @@ allTests(const Ice::CommunicatorPtr& communicator) BasePtr bp2 = ICE_DYNAMIC_CAST(Base, bp1->ice_clone()); test(bp1->theS.str == bp2->theS.str); test(bp1->str == bp2->str); - + #ifndef ICE_CPP11_MAPPING // // With C++11 mapping value classes are never abstracts. @@ -119,22 +119,22 @@ allTests(const Ice::CommunicatorPtr& communicator) BPtr b1 = initial->getB1(); test(b1); cout << "ok" << endl; - + cout << "getting B2... " << flush; BPtr b2 = initial->getB2(); test(b2); cout << "ok" << endl; - + cout << "getting C... " << flush; CPtr c = initial->getC(); test(c); cout << "ok" << endl; - + cout << "getting D... " << flush; DPtr d = initial->getD(); test(d); cout << "ok" << endl; - + cout << "checking consistency... " << flush; test(b1 != b2); #ifdef ICE_CPP11_MAPPING @@ -182,7 +182,7 @@ allTests(const Ice::CommunicatorPtr& communicator) test(c); test(d); cout << "ok" << endl; - + cout << "checking consistency... " << flush; #ifdef ICE_CPP11_MAPPING test(b1 != b2); @@ -263,7 +263,7 @@ allTests(const Ice::CommunicatorPtr& communicator) test(h && HPtr::dynamicCast(h)); #endif cout << "ok" << endl; - + cout << "getting D1... " << flush; D1Ptr d1 = ICE_MAKE_SHARED(D1, ICE_MAKE_SHARED(A1, "a1"), @@ -276,7 +276,7 @@ allTests(const Ice::CommunicatorPtr& communicator) test(d1->a3->name == "a3"); test(d1->a4->name == "a4"); cout << "ok" << endl; - + cout << "throw EDerived... " << flush; try { @@ -325,5 +325,13 @@ allTests(const Ice::CommunicatorPtr& communicator) testUOE(communicator); cout << "ok" << endl; #endif + + cout << "testing getting ObjectFactory... " << flush; + test(communicator->findObjectFactory("TestOF")); + cout << "ok" << endl; + cout << "testing getting ObjectFactory as ValueFactory... " << flush; + test(communicator->findValueFactory("TestOF")); + cout << "ok" << endl; + return initial; } diff --git a/cpp/test/Ice/objects/Client.cpp b/cpp/test/Ice/objects/Client.cpp index 471f63de90e..cf1e60c1993 100644 --- a/cpp/test/Ice/objects/Client.cpp +++ b/cpp/test/Ice/objects/Client.cpp @@ -26,7 +26,7 @@ function<shared_ptr<T>(const string&)> makeFactory() }; } #else -class MyObjectFactory : public Ice::ObjectFactory +class MyValueFactory : public Ice::ValueFactory { public: @@ -69,35 +69,58 @@ public: return 0; } +}; +#endif +class MyObjectFactory : public Ice::ObjectFactory +{ +public: + MyObjectFactory() : _destroyed(false) + { + } + + ~MyObjectFactory() + { + assert(_destroyed); + } + + virtual Ice::ValuePtr create(const string& type) + { + return ICE_NULLPTR; + } + virtual void destroy() { - // Nothing to do + _destroyed = true; } + +private: + bool _destroyed; }; -#endif int run(int, char**, const Ice::CommunicatorPtr& communicator) { #ifdef ICE_CPP11_MAPPING - communicator->addObjectFactory(makeFactory<BI>(), "::Test::B"); - communicator->addObjectFactory(makeFactory<CI>(), "::Test::C"); - communicator->addObjectFactory(makeFactory<DI>(), "::Test::D"); - communicator->addObjectFactory(makeFactory<EI>(), "::Test::E"); - communicator->addObjectFactory(makeFactory<FI>(), "::Test::F"); - communicator->addObjectFactory(makeFactory<II>(), "::Test::I"); - communicator->addObjectFactory(makeFactory<JI>(), "::Test::J"); - communicator->addObjectFactory(makeFactory<HI>(), "::Test::H"); + communicator->addValueFactory(makeFactory<BI>(), "::Test::B"); + communicator->addValueFactory(makeFactory<CI>(), "::Test::C"); + communicator->addValueFactory(makeFactory<DI>(), "::Test::D"); + communicator->addValueFactory(makeFactory<EI>(), "::Test::E"); + communicator->addValueFactory(makeFactory<FI>(), "::Test::F"); + communicator->addValueFactory(makeFactory<II>(), "::Test::I"); + communicator->addValueFactory(makeFactory<JI>(), "::Test::J"); + communicator->addValueFactory(makeFactory<HI>(), "::Test::H"); + communicator->addObjectFactory(make_shared<MyObjectFactory>(), "TestOF"); #else - Ice::ObjectFactoryPtr factory = new MyObjectFactory; - communicator->addObjectFactory(factory, "::Test::B"); - communicator->addObjectFactory(factory, "::Test::C"); - communicator->addObjectFactory(factory, "::Test::D"); - communicator->addObjectFactory(factory, "::Test::E"); - communicator->addObjectFactory(factory, "::Test::F"); - communicator->addObjectFactory(factory, "::Test::I"); - communicator->addObjectFactory(factory, "::Test::J"); - communicator->addObjectFactory(factory, "::Test::H"); + Ice::ValueFactoryPtr factory = new MyValueFactory; + communicator->addValueFactory(factory, "::Test::B"); + communicator->addValueFactory(factory, "::Test::C"); + communicator->addValueFactory(factory, "::Test::D"); + communicator->addValueFactory(factory, "::Test::E"); + communicator->addValueFactory(factory, "::Test::F"); + communicator->addValueFactory(factory, "::Test::I"); + communicator->addValueFactory(factory, "::Test::J"); + communicator->addValueFactory(factory, "::Test::H"); + communicator->addObjectFactory(new MyObjectFactory(), "TestOF"); #endif InitialPrxPtr allTests(const Ice::CommunicatorPtr&); diff --git a/cpp/test/Ice/objects/Collocated.cpp b/cpp/test/Ice/objects/Collocated.cpp index 0d2f8562fa9..270d5b495ea 100644 --- a/cpp/test/Ice/objects/Collocated.cpp +++ b/cpp/test/Ice/objects/Collocated.cpp @@ -26,7 +26,7 @@ function<shared_ptr<T>(const string&)> makeFactory() }; } #else -class MyObjectFactory : public Ice::ObjectFactory +class MyValueFactory : public Ice::ValueFactory { public: @@ -69,35 +69,57 @@ public: return 0; } +}; +#endif +class MyObjectFactory : public Ice::ObjectFactory +{ +public: + MyObjectFactory() : _destroyed(false) + { + } + + ~MyObjectFactory() + { + assert(_destroyed); + } + + virtual Ice::ValuePtr create(const string& type) + { + return ICE_NULLPTR; + } + virtual void destroy() { - // Nothing to do + _destroyed = true; } +private: + bool _destroyed; }; -#endif int run(int, char**, const Ice::CommunicatorPtr& communicator) { #ifdef ICE_CPP11_MAPPING - communicator->addObjectFactory(makeFactory<BI>(), "::Test::B"); - communicator->addObjectFactory(makeFactory<CI>(), "::Test::C"); - communicator->addObjectFactory(makeFactory<DI>(), "::Test::D"); - communicator->addObjectFactory(makeFactory<EI>(), "::Test::E"); - communicator->addObjectFactory(makeFactory<FI>(), "::Test::F"); - communicator->addObjectFactory(makeFactory<II>(), "::Test::I"); - communicator->addObjectFactory(makeFactory<JI>(), "::Test::J"); - communicator->addObjectFactory(makeFactory<HI>(), "::Test::H"); + communicator->addValueFactory(makeFactory<BI>(), "::Test::B"); + communicator->addValueFactory(makeFactory<CI>(), "::Test::C"); + communicator->addValueFactory(makeFactory<DI>(), "::Test::D"); + communicator->addValueFactory(makeFactory<EI>(), "::Test::E"); + communicator->addValueFactory(makeFactory<FI>(), "::Test::F"); + communicator->addValueFactory(makeFactory<II>(), "::Test::I"); + communicator->addValueFactory(makeFactory<JI>(), "::Test::J"); + communicator->addValueFactory(makeFactory<HI>(), "::Test::H"); + communicator->addObjectFactory(make_shared<MyObjectFactory>(), "TestOF"); #else - Ice::ObjectFactoryPtr factory = new MyObjectFactory; - communicator->addObjectFactory(factory, "::Test::B"); - communicator->addObjectFactory(factory, "::Test::C"); - communicator->addObjectFactory(factory, "::Test::D"); - communicator->addObjectFactory(factory, "::Test::E"); - communicator->addObjectFactory(factory, "::Test::F"); - communicator->addObjectFactory(factory, "::Test::I"); - communicator->addObjectFactory(factory, "::Test::J"); - communicator->addObjectFactory(factory, "::Test::H"); + Ice::ValueFactoryPtr factory = new MyValueFactory; + communicator->addValueFactory(factory, "::Test::B"); + communicator->addValueFactory(factory, "::Test::C"); + communicator->addValueFactory(factory, "::Test::D"); + communicator->addValueFactory(factory, "::Test::E"); + communicator->addValueFactory(factory, "::Test::F"); + communicator->addValueFactory(factory, "::Test::I"); + communicator->addValueFactory(factory, "::Test::J"); + communicator->addValueFactory(factory, "::Test::H"); + communicator->addObjectFactory(new MyObjectFactory(), "TestOF"); #endif communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); diff --git a/cpp/test/Ice/objects/Server.cpp b/cpp/test/Ice/objects/Server.cpp index 0098cb34953..428cb735336 100644 --- a/cpp/test/Ice/objects/Server.cpp +++ b/cpp/test/Ice/objects/Server.cpp @@ -26,7 +26,7 @@ function<shared_ptr<T>(const string&)> makeFactory() }; } #else -class MyObjectFactory : public Ice::ObjectFactory +class MyValueFactory : public Ice::ValueFactory { public: @@ -49,10 +49,6 @@ public: return 0; } - virtual void destroy() - { - // Nothing to do - } }; #endif @@ -60,20 +56,20 @@ int run(int, char**, const Ice::CommunicatorPtr& communicator) { #ifdef ICE_CPP11_MAPPING - communicator->addObjectFactory(makeFactory<II>(), "::Test::I"); - communicator->addObjectFactory(makeFactory<JI>(), "::Test::J"); - communicator->addObjectFactory(makeFactory<HI>(), "::Test::H"); + communicator->addValueFactory(makeFactory<II>(), "::Test::I"); + communicator->addValueFactory(makeFactory<JI>(), "::Test::J"); + communicator->addValueFactory(makeFactory<HI>(), "::Test::H"); #else - Ice::ObjectFactoryPtr factory = new MyObjectFactory; - communicator->addObjectFactory(factory, "::Test::I"); - communicator->addObjectFactory(factory, "::Test::J"); - communicator->addObjectFactory(factory, "::Test::H"); + Ice::ValueFactoryPtr factory = new MyValueFactory; + communicator->addValueFactory(factory, "::Test::I"); + communicator->addValueFactory(factory, "::Test::J"); + communicator->addValueFactory(factory, "::Test::H"); #endif communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); adapter->add(ICE_MAKE_SHARED(InitialI, adapter), communicator->stringToIdentity("initial")); - + #ifdef ICE_CPP11_MAPPING //TODO #else diff --git a/cpp/test/Ice/optional/AllTests.cpp b/cpp/test/Ice/optional/AllTests.cpp index 3e6a1560623..9a4b3bae2aa 100644 --- a/cpp/test/Ice/optional/AllTests.cpp +++ b/cpp/test/Ice/optional/AllTests.cpp @@ -177,7 +177,7 @@ private: FPtr _f; }; -class FactoryI : public Ice::ObjectFactory +class FactoryI : public Ice::ValueFactory { bool _enabled; @@ -223,10 +223,6 @@ public: return 0; } - void destroy() - { - } - void setEnabled(bool enabled) { @@ -239,7 +235,7 @@ InitialPrx allTests(const Ice::CommunicatorPtr& communicator, bool) { FactoryIPtr factory = new FactoryI(); - communicator->addObjectFactory(factory, ""); + communicator->addValueFactory(factory, ""); cout << "testing stringToProxy... " << flush; string ref = "initial:default -p 12010"; @@ -621,7 +617,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool) RecursivePtr outer = new Recursive(); outer->value = recursive1; initial->pingPong(outer); - + GPtr g = new G(); g->gg1Opt = new G1("gg1Opt"); g->gg2 = new G2(10); diff --git a/cpp/test/Ice/slicing/objects/AllTests.cpp b/cpp/test/Ice/slicing/objects/AllTests.cpp index e7b9c093d3a..44172e57669 100644 --- a/cpp/test/Ice/slicing/objects/AllTests.cpp +++ b/cpp/test/Ice/slicing/objects/AllTests.cpp @@ -82,7 +82,7 @@ public: test(sbskd->sbskd == "SBSKnownDerived.sbskd"); called(); } - + void response_SBSKnownDerivedAsSBSKnownDerived(const SBSKnownDerivedPtr& sbskd) { @@ -106,7 +106,7 @@ public: void exception_SBSUnknownDerivedAsSBaseCompact(const Ice::Exception& exc) { - test(exc.ice_name() == "Ice::NoObjectFactoryException"); + test(exc.ice_name() == "Ice::NoValueFactoryException"); called(); } @@ -119,7 +119,7 @@ public: void exception_SUnknownAsObject10(const Ice::Exception& exc) { - test(exc.ice_name() == "Ice::NoObjectFactoryException"); + test(exc.ice_name() == "Ice::NoValueFactoryException"); called(); } @@ -463,13 +463,13 @@ public: called(); } - void + void response() { test(false); } - void + void exception(const ::Ice::Exception& ex) { if(!dynamic_cast<const Ice::OperationNotExistException*>(&ex)) @@ -481,7 +481,7 @@ public: called(); } } - + BPtr rb; SS3 rss3; BDict rbdict; @@ -509,7 +509,7 @@ public: int PNodeI::counter = 0; #ifndef ICE_CPP11_MAPPING -class NodeFactoryI : public Ice::ObjectFactory +class NodeFactoryI : public Ice::ValueFactory { public: @@ -548,7 +548,7 @@ public: int PreservedI::counter = 0; #ifndef ICE_CPP11_MAPPING -class PreservedFactoryI : public Ice::ObjectFactory +class PreservedFactoryI : public Ice::ValueFactory { public: @@ -579,7 +579,7 @@ testUOO(const TestIntfPrxPtr& test) test(ICE_DYNAMIC_CAST(Ice::UnknownSlicedObject, o)->getUnknownTypeId() == "::Test::SUnknown"); test->checkSUnknown(o); } - catch(const Ice::NoObjectFactoryException&) + catch(const Ice::NoValueFactoryException&) { test(test->ice_getEncodingVersion() == Ice::Encoding_1_0); } @@ -814,7 +814,7 @@ allTests(const Ice::CommunicatorPtr& communicator) catch(const Ice::OperationNotExistException&) { } - catch(const Ice::NoObjectFactoryException&) + catch(const Ice::NoValueFactoryException&) { // Expected. } @@ -883,7 +883,7 @@ allTests(const Ice::CommunicatorPtr& communicator) f.get(); test(false); } - catch(const Ice::NoObjectFactoryException&) + catch(const Ice::NoValueFactoryException&) { } catch(...) @@ -920,7 +920,7 @@ allTests(const Ice::CommunicatorPtr& communicator) f.get(); test(false); } - catch(const Ice::NoObjectFactoryException&) + catch(const Ice::NoValueFactoryException&) { } catch(...) @@ -941,7 +941,7 @@ allTests(const Ice::CommunicatorPtr& communicator) { test(false); } - + } #else CallbackPtr cb = new Callback; @@ -1289,7 +1289,7 @@ allTests(const Ice::CommunicatorPtr& communicator) auto result = f.get(); auto b1 = move(result.p1); auto b2 = move(result.p2); - + test(b1); test(b1->ice_id() == "::Test::D1"); test(b1->sb == "D1.sb"); @@ -1599,7 +1599,7 @@ allTests(const Ice::CommunicatorPtr& communicator) auto b1 = f.get(); #else CallbackPtr cb = new Callback; - test->begin_returnTest3(d3, d1, + test->begin_returnTest3(d3, d1, newCallback_TestIntf_returnTest3(cb, &Callback::response_returnTest3, &Callback::exception)); cb->check(); BPtr b1 = cb->rb; @@ -2072,7 +2072,7 @@ allTests(const Ice::CommunicatorPtr& communicator) ss1->ice_collectable(true); ss2->ice_collectable(true); #endif - + #ifdef ICE_CPP11_MAPPING ss = test->sequenceTest_async(ss1, ss2).get(); #else @@ -2766,7 +2766,7 @@ allTests(const Ice::CommunicatorPtr& communicator) CompactPCDerivedPtr pcd = ICE_MAKE_SHARED(CompactPCDerived); pcd->pi = 3; pcd->pbs.push_back(pcd); - + #ifdef ICE_CPP11_MAPPING if(test->ice_getEncodingVersion() == Ice::Encoding_1_0) { @@ -2785,7 +2785,7 @@ allTests(const Ice::CommunicatorPtr& communicator) } #else pcd->ice_collectable(true); - + CallbackPtr cb = new Callback; if(test->ice_getEncodingVersion() == Ice::Encoding_1_0) { @@ -2796,7 +2796,7 @@ allTests(const Ice::CommunicatorPtr& communicator) else { test->begin_exchangePBase(pcd, newCallback_TestIntf_exchangePBase(cb, - &Callback::response_compactPreserved2, + &Callback::response_compactPreserved2, &Callback::exception)); } cb->check(); @@ -2875,7 +2875,7 @@ allTests(const Ice::CommunicatorPtr& communicator) // Register a factory in order to substitute our own subclass of PNode. This provides // an easy way to determine how many unmarshaled instances currently exist. // - communicator->addObjectFactory(new NodeFactoryI, PNode::ice_staticId()); + communicator->addValueFactory(new NodeFactoryI, PNode::ice_staticId()); // // Relay a graph through the server. This test uses a preserved class @@ -2921,7 +2921,7 @@ allTests(const Ice::CommunicatorPtr& communicator) // Register a factory in order to substitute our own subclass of Preserved. This provides // an easy way to determine how many unmarshaled instances currently exist. // - communicator->addObjectFactory(new PreservedFactoryI, Preserved::ice_staticId()); + communicator->addValueFactory(new PreservedFactoryI, Preserved::ice_staticId()); // // Obtain a preserved object from the server where the most-derived diff --git a/cpp/test/Ice/stream/Client.cpp b/cpp/test/Ice/stream/Client.cpp index 604ff0cb943..f09293e7092 100644 --- a/cpp/test/Ice/stream/Client.cpp +++ b/cpp/test/Ice/stream/Client.cpp @@ -59,7 +59,7 @@ public: }; typedef IceUtil::Handle<TestObjectReader> TestObjectReaderPtr; -class TestObjectFactory : public Ice::ObjectFactory +class TestValueFactory : public Ice::ValueFactory { public: @@ -94,7 +94,7 @@ public: }; typedef IceUtil::Handle<TestReadObjectCallback> TestReadObjectCallbackPtr; -class MyClassFactoryWrapper : public Ice::ObjectFactory +class MyClassFactoryWrapper : public Ice::ValueFactory { public: @@ -114,7 +114,7 @@ public: } void - setFactory(const Ice::ObjectFactoryPtr& factory) + setFactory(const Ice::ValueFactoryPtr& factory) { if(!factory) { @@ -128,11 +128,11 @@ public: private: - Ice::ObjectFactoryPtr _factory; + Ice::ValueFactoryPtr _factory; }; typedef IceUtil::Handle<MyClassFactoryWrapper> MyClassFactoryWrapperPtr; -class MyInterfaceFactory : public Ice::ObjectFactory +class MyInterfaceFactory : public Ice::ValueFactory { public: @@ -152,8 +152,8 @@ int run(int, char**, const Ice::CommunicatorPtr& communicator) { MyClassFactoryWrapperPtr factoryWrapper = new MyClassFactoryWrapper; - communicator->addObjectFactory(factoryWrapper, Test::MyClass::ice_staticId()); - communicator->addObjectFactory(new MyInterfaceFactory, Test::MyInterface::ice_staticId()); + communicator->addValueFactory(factoryWrapper, Test::MyClass::ice_staticId()); + communicator->addValueFactory(new MyInterfaceFactory, Test::MyInterface::ice_staticId()); Ice::InputStreamPtr in; Ice::OutputStreamPtr out; @@ -829,7 +829,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) out->writePendingObjects(); out->finished(data); test(writer->called); - factoryWrapper->setFactory(new TestObjectFactory); + factoryWrapper->setFactory(new TestValueFactory); in = Ice::createInputStream(communicator, data); TestReadObjectCallbackPtr cb = new TestReadObjectCallback; in->readObject(cb); |