summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2006-11-08 08:31:58 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2006-11-08 08:31:58 +0000
commit3ddaa9791c25e342e08eea9ed34d9995db01198c (patch)
treebe71103604d59d280c92bb0f4c8d6d50dc5204a8
parentd9a7249485c6e4d06e1379f4e7c5b7740ee66073 (diff)
downloadATCD-3ddaa9791c25e342e08eea9ed34d9995db01198c.tar.gz
Wed Nov 8 07:31:12 UTC 2006 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r--TAO/tests/DSI_Gateway/client.cpp30
-rw-r--r--TAO/tests/DSI_Gateway/test.idl2
-rw-r--r--TAO/tests/DSI_Gateway/test_i.cpp21
-rw-r--r--TAO/tests/DSI_Gateway/test_i.h9
-rw-r--r--TAO/tests/DSI_Gateway/test_i.inl3
5 files changed, 57 insertions, 8 deletions
diff --git a/TAO/tests/DSI_Gateway/client.cpp b/TAO/tests/DSI_Gateway/client.cpp
index 4919809f944..8d1d133fb22 100644
--- a/TAO/tests/DSI_Gateway/client.cpp
+++ b/TAO/tests/DSI_Gateway/client.cpp
@@ -107,12 +107,30 @@ main (int argc, char *argv[])
{
for (int i = 0; i != niterations; ++i)
{
- the_in_structure.i = i;
- CORBA::String_var name = CORBA::string_dup ("the name");
+ CORBA::Long const tv = i + 100;
+ server->test_val(tv);
+ CORBA::Long const rtv = server->test_val ();
- Structure_var the_out_structure;
+ if (TAO_debug_level > 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "DSI_Simpler_Server ==== Expected result = %d for %d\n",
+ rtv, tv));
+ }
+
+ if (rtv != tv)
+ {
+ ACE_ERROR ((LM_ERROR,
+ "(%P|%t) ERROR: unexpected result = %d for %d\n",
+ rtv, tv));
+ }
+
+ the_in_structure.i = i;
+ CORBA::String_var name = CORBA::string_dup ("the name");
- CORBA::Long r =
+ Structure_var the_out_structure;
+
+ CORBA::Long const r =
server->test_method (i,
the_in_structure,
the_out_structure.out (),
@@ -136,8 +154,8 @@ main (int argc, char *argv[])
if (r != i)
{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) unexpected result = %d for %d",
+ ACE_ERROR ((LM_ERROR,
+ "(%P|%t) ERROR: unexpected result = %d for %d",
r, i));
}
}
diff --git a/TAO/tests/DSI_Gateway/test.idl b/TAO/tests/DSI_Gateway/test.idl
index d35c073b70d..29cdc6f4d15 100644
--- a/TAO/tests/DSI_Gateway/test.idl
+++ b/TAO/tests/DSI_Gateway/test.idl
@@ -19,6 +19,8 @@ exception test_exception
interface Simple_Server
{
+ attribute long test_val;
+
long test_method (in long x,
in Structure the_in_structure,
out Structure the_out_structure,
diff --git a/TAO/tests/DSI_Gateway/test_i.cpp b/TAO/tests/DSI_Gateway/test_i.cpp
index 68759674acf..759578e6f6a 100644
--- a/TAO/tests/DSI_Gateway/test_i.cpp
+++ b/TAO/tests/DSI_Gateway/test_i.cpp
@@ -61,3 +61,24 @@ Simple_Server_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
{
this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
}
+
+CORBA::Long
+Simple_Server_i::test_val (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return vlong_;
+}
+
+void
+Simple_Server_i::test_val (CORBA::Long tv ACE_ENV_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ if (TAO_debug_level > 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Simpler_Server_i ====test_val: %d\n", tv
+ ));
+ }
+ vlong_ = tv;
+}
+
diff --git a/TAO/tests/DSI_Gateway/test_i.h b/TAO/tests/DSI_Gateway/test_i.h
index 499ee8f0dc4..776a385b9e1 100644
--- a/TAO/tests/DSI_Gateway/test_i.h
+++ b/TAO/tests/DSI_Gateway/test_i.h
@@ -38,6 +38,12 @@ public:
ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException));
+ CORBA::Long test_val (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC (( CORBA::SystemException));
+
+ void test_val (CORBA::Long test_val ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
void raise_user_exception (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException,
test_exception));
@@ -49,8 +55,9 @@ public:
ACE_THROW_SPEC ((CORBA::SystemException));
private:
- CORBA::ORB_var orb_;
// The ORB
+ CORBA::ORB_var orb_;
+ CORBA::Long vlong_;
};
#if defined(__ACE_INLINE__)
diff --git a/TAO/tests/DSI_Gateway/test_i.inl b/TAO/tests/DSI_Gateway/test_i.inl
index 97524552ff4..bd51e3a42bd 100644
--- a/TAO/tests/DSI_Gateway/test_i.inl
+++ b/TAO/tests/DSI_Gateway/test_i.inl
@@ -2,6 +2,7 @@
ACE_INLINE
Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
+ : orb_ (CORBA::ORB::_duplicate (orb)),
+ vlong_ (0)
{
}