diff options
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/test/Ice/objects/AllTests.cpp | 27 | ||||
-rw-r--r-- | cpp/test/Ice/objects/Test.ice | 6 | ||||
-rw-r--r-- | cpp/test/Ice/objects/TestI.cpp | 39 | ||||
-rw-r--r-- | cpp/test/Ice/objects/TestI.h | 24 |
4 files changed, 16 insertions, 80 deletions
diff --git a/cpp/test/Ice/objects/AllTests.cpp b/cpp/test/Ice/objects/AllTests.cpp index 9cd44faeba0..63da17959e3 100644 --- a/cpp/test/Ice/objects/AllTests.cpp +++ b/cpp/test/Ice/objects/AllTests.cpp @@ -180,17 +180,16 @@ allTests(const Ice::CommunicatorPtr& communicator) test(ICE_DYNAMIC_CAST(C, ICE_DYNAMIC_CAST(B, b1->theA)->theC)); test(ICE_DYNAMIC_CAST(C, ICE_DYNAMIC_CAST(B, b1->theA)->theC)->theB == b1->theA); -#ifdef ICE_CPP11_MAPPING test(b1->preMarshalInvoked); + test(b1->postUnmarshalInvoked); test(b1->theA->preMarshalInvoked); + test(b1->theA->postUnmarshalInvoked); +#ifdef ICE_CPP11_MAPPING test(dynamic_pointer_cast<B>(b1->theA)->theC->preMarshalInvoked); + test(dynamic_pointer_cast<B>(b1->theA)->theC->postUnmarshalInvoked); #else - test(b1->preMarshalInvoked); - test(b1->postUnmarshalInvoked()); - test(b1->theA->preMarshalInvoked); - test(b1->theA->postUnmarshalInvoked()); test(BPtr::dynamicCast(b1->theA)->theC->preMarshalInvoked); - test(BPtr::dynamicCast(b1->theA)->theC->postUnmarshalInvoked()); + test(BPtr::dynamicCast(b1->theA)->theC->postUnmarshalInvoked); #endif // More tests possible for b2 and d, but I think this is already sufficient. test(b2->theA == b2); @@ -223,11 +222,6 @@ allTests(const Ice::CommunicatorPtr& communicator) test(d->theA == dynamic_pointer_cast<A>(b1)); test(d->theB == dynamic_pointer_cast<B>(b2)); test(d->theC == nullptr); - - test(d->preMarshalInvoked); - test(d->theA->preMarshalInvoked); - test(d->theB->preMarshalInvoked); - test(d->theB->theC->preMarshalInvoked); #else test(b1 != b2); test(b1 != c); @@ -245,16 +239,15 @@ allTests(const Ice::CommunicatorPtr& communicator) test(d->theA == b1); test(d->theB == b2); test(d->theC == ICE_NULLPTR); - +#endif test(d->preMarshalInvoked); - test(d->postUnmarshalInvoked()); + test(d->postUnmarshalInvoked); test(d->theA->preMarshalInvoked); - test(d->theA->postUnmarshalInvoked()); + test(d->theA->postUnmarshalInvoked); test(d->theB->preMarshalInvoked); - test(d->theB->postUnmarshalInvoked()); + test(d->theB->postUnmarshalInvoked); test(d->theB->theC->preMarshalInvoked); - test(d->theB->theC->postUnmarshalInvoked()); -#endif + test(d->theB->theC->postUnmarshalInvoked); cout << "ok" << endl; cout << "testing protected members... " << flush; diff --git a/cpp/test/Ice/objects/Test.ice b/cpp/test/Ice/objects/Test.ice index 95099c82114..20d47d5dcd7 100644 --- a/cpp/test/Ice/objects/Test.ice +++ b/cpp/test/Ice/objects/Test.ice @@ -42,7 +42,7 @@ class A C theC; bool preMarshalInvoked; - bool postUnmarshalInvoked(); + bool postUnmarshalInvoked; }; class B extends A @@ -55,7 +55,7 @@ class C B theB; bool preMarshalInvoked; - bool postUnmarshalInvoked(); + bool postUnmarshalInvoked; }; class D @@ -65,7 +65,7 @@ class D C theC; bool preMarshalInvoked; - bool postUnmarshalInvoked(); + bool postUnmarshalInvoked; }; ["protected"] class E diff --git a/cpp/test/Ice/objects/TestI.cpp b/cpp/test/Ice/objects/TestI.cpp index 5ac2efce628..54433b62bff 100644 --- a/cpp/test/Ice/objects/TestI.cpp +++ b/cpp/test/Ice/objects/TestI.cpp @@ -13,17 +13,6 @@ using namespace Test; using namespace std; -BI::BI() : - _postUnmarshalInvoked(false) -{ -} - -bool -BI::postUnmarshalInvoked(const Ice::Current&) -{ - return _postUnmarshalInvoked; -} - void BI::ice_preMarshal() { @@ -33,18 +22,7 @@ BI::ice_preMarshal() void BI::ice_postUnmarshal() { - _postUnmarshalInvoked = true; -} - -CI::CI() : - _postUnmarshalInvoked(false) -{ -} - -bool -CI::postUnmarshalInvoked(const Ice::Current&) -{ - return _postUnmarshalInvoked; + postUnmarshalInvoked = true; } void @@ -56,18 +34,7 @@ CI::ice_preMarshal() void CI::ice_postUnmarshal() { - _postUnmarshalInvoked = true; -} - -DI::DI() : - _postUnmarshalInvoked(false) -{ -} - -bool -DI::postUnmarshalInvoked(const Ice::Current&) -{ - return _postUnmarshalInvoked; + postUnmarshalInvoked = true; } void @@ -79,7 +46,7 @@ DI::ice_preMarshal() void DI::ice_postUnmarshal() { - _postUnmarshalInvoked = true; + postUnmarshalInvoked = true; } EI::EI() : diff --git a/cpp/test/Ice/objects/TestI.h b/cpp/test/Ice/objects/TestI.h index 7fd7fff9e65..9b3871ab3ff 100644 --- a/cpp/test/Ice/objects/TestI.h +++ b/cpp/test/Ice/objects/TestI.h @@ -17,48 +17,24 @@ class BI : public Test::B { public: - BI(); - - virtual bool postUnmarshalInvoked(const Ice::Current&); - virtual void ice_preMarshal(); virtual void ice_postUnmarshal(); - -private: - - bool _postUnmarshalInvoked; }; class CI : public Test::C { public: - CI(); - - virtual bool postUnmarshalInvoked(const Ice::Current&); - virtual void ice_preMarshal(); virtual void ice_postUnmarshal(); - -private: - - bool _postUnmarshalInvoked; }; class DI : public Test::D { public: - DI(); - - virtual bool postUnmarshalInvoked(const Ice::Current&); - virtual void ice_preMarshal(); virtual void ice_postUnmarshal(); - -private: - - bool _postUnmarshalInvoked; }; class EI : public Test::E |