summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2006-07-21 14:08:30 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2006-07-21 14:08:30 +0000
commit677446d3d89011518e78696e074d87ce87934ee4 (patch)
treee30616732677091b1d0cd8e91e9782ebe69ab769
parent76d272a607e3cf62e6a0d8cfd28cc647e463abf0 (diff)
downloadATCD-677446d3d89011518e78696e074d87ce87934ee4.tar.gz
ChangeLogTag: Fri Jul 21 13:28:31 UTC 2006 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/client.cpp3
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/test.idl2
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/test_i.cpp39
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/test_i.h4
4 files changed, 48 insertions, 0 deletions
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/client.cpp b/TAO/tests/Portable_Interceptors/PICurrent/client.cpp
index 4325478fd98..4d98648a2ac 100644
--- a/TAO/tests/Portable_Interceptors/PICurrent/client.cpp
+++ b/TAO/tests/Portable_Interceptors/PICurrent/client.cpp
@@ -143,6 +143,9 @@ main (int argc, char *argv[])
ACE_TRY_THROW (CORBA::INTERNAL ());
}
+ server->invoke_we (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/test.idl b/TAO/tests/Portable_Interceptors/PICurrent/test.idl
index 6e808b2c52f..a0f4dacae13 100644
--- a/TAO/tests/Portable_Interceptors/PICurrent/test.idl
+++ b/TAO/tests/Portable_Interceptors/PICurrent/test.idl
@@ -22,6 +22,8 @@ module PICurrentTest
void invoke_you ();
+ void invoke_we ();
+
oneway void shutdown ();
};
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/test_i.cpp b/TAO/tests/Portable_Interceptors/PICurrent/test_i.cpp
index f0ea088d3da..453c16429aa 100644
--- a/TAO/tests/Portable_Interceptors/PICurrent/test_i.cpp
+++ b/TAO/tests/Portable_Interceptors/PICurrent/test_i.cpp
@@ -151,6 +151,45 @@ test_i::invoke_you (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
}
void
+test_i::invoke_we (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ // Insert some data into the TSC PICurrent object.
+ const char str[] = "We drink milk!";
+
+ CORBA::Any data;
+
+ data <<= str;
+
+ ACE_TRY_EX (foo)
+ {
+ this->current_->set_slot (this->slot_id_,
+ data
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK_EX (foo);
+ }
+ ACE_CATCH (PortableInterceptor::InvalidSlot, ex)
+ {
+ ACE_PRINT_EXCEPTION (ex,
+ "Exception thrown in "
+ "test_i::invoke_me() when calling "
+ "Current::set_slot\n");
+
+ ACE_DEBUG ((LM_DEBUG,
+ "Invalid slot: %u\n",
+ this->slot_id_));
+
+ ACE_TRY_THROW_EX (CORBA::INTERNAL (), foo);
+ }
+ ACE_ENDTRY;
+ ACE_CHECK;
+
+ ACE_DEBUG ((LM_DEBUG,
+ "(%P|%t) String \"%s\" inserted into TSC.\n",
+ str));
+}
+
+void
test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/test_i.h b/TAO/tests/Portable_Interceptors/PICurrent/test_i.h
index 74244723b72..c9de94d10a0 100644
--- a/TAO/tests/Portable_Interceptors/PICurrent/test_i.h
+++ b/TAO/tests/Portable_Interceptors/PICurrent/test_i.h
@@ -50,6 +50,10 @@ public:
virtual void invoke_you (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
+ /// Test just a set slot
+ virtual void invoke_we (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
/// Shutdown the ORB.
virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));