summaryrefslogtreecommitdiff
path: root/TAO/tests/DynAny_Test/test_dynany.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/DynAny_Test/test_dynany.cpp')
-rw-r--r--TAO/tests/DynAny_Test/test_dynany.cpp68
1 files changed, 17 insertions, 51 deletions
diff --git a/TAO/tests/DynAny_Test/test_dynany.cpp b/TAO/tests/DynAny_Test/test_dynany.cpp
index 35d7e1d1677..02ce71c105f 100644
--- a/TAO/tests/DynAny_Test/test_dynany.cpp
+++ b/TAO/tests/DynAny_Test/test_dynany.cpp
@@ -55,12 +55,10 @@ Test_DynAny::run_test (void)
CORBA::Object_var factory_obj =
this->orb_->resolve_initial_references ("DynAnyFactory"
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
DynamicAny::DynAnyFactory_var dynany_factory =
DynamicAny::DynAnyFactory::_narrow (factory_obj.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
if (CORBA::is_nil (dynany_factory.in ()))
{
@@ -77,15 +75,12 @@ Test_DynAny::run_test (void)
in1 <<= data.m_double2;
DynamicAny::DynAny_var fa1 =
dynany_factory->create_dyn_any (in1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
fa1->insert_double (data.m_double1
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
CORBA::Double d_out =
- fa1->get_double (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ fa1->get_double ();
if (d_out == data.m_double1)
{
@@ -104,16 +99,12 @@ Test_DynAny::run_test (void)
DynamicAny::DynAny_var ftc1 =
dynany_factory->create_dyn_any_from_type_code (CORBA::_tc_double
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
CORBA::Any in_any1;
in_any1 <<= data.m_double1;
ftc1->from_any (in_any1
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
analyzer.analyze (ftc1.in() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::Any_var out_any1 = ftc1->to_any (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ CORBA::Any_var out_any1 = ftc1->to_any ();
out_any1 >>= d_out;
if (d_out == data.m_double1)
@@ -126,10 +117,8 @@ Test_DynAny::run_test (void)
++this->error_count_;
}
- fa1->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ftc1->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ fa1->destroy ();
+ ftc1->destroy ();
ACE_DEBUG ((LM_DEBUG,
"\t*=*=*=*= %s =*=*=*=*\n",
@@ -143,13 +132,10 @@ Test_DynAny::run_test (void)
DynamicAny::DynAny_var fa2 =
dynany_factory->create_dyn_any (in
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
fa2->insert_typecode (data.m_typecode1
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
CORBA::TypeCode_var tc_out =
- fa2->get_typecode (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ fa2->get_typecode ();
if (tc_out->equal (data.m_typecode1
ACE_ENV_ARG_PARAMETER))
@@ -162,7 +148,6 @@ Test_DynAny::run_test (void)
++this->error_count_;
}
- ACE_TRY_CHECK;
ACE_DEBUG ((LM_DEBUG,
"testing: constructor(TypeCode)/from_any/to_any\n"));
@@ -170,22 +155,17 @@ Test_DynAny::run_test (void)
DynamicAny::DynAny_var ftc2 =
dynany_factory->create_dyn_any_from_type_code (CORBA::_tc_TypeCode
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
CORBA::Any in_any2;
in_any2 <<= data.m_typecode1;
ftc2->from_any (in_any2
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
analyzer.analyze (ftc2.in() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::Any_var out_any2 = ftc2->to_any (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ CORBA::Any_var out_any2 = ftc2->to_any ();
CORBA::TypeCode_ptr out_tc;
out_any2 >>= out_tc;
CORBA::Boolean equal = out_tc->equal (data.m_typecode1
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
if (equal)
{
@@ -197,13 +177,10 @@ Test_DynAny::run_test (void)
++this->error_count_;
}
- ACE_TRY_CHECK;
- fa2->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ftc2->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
+ fa2->destroy ();
+ ftc2->destroy ();
+
ACE_DEBUG ((LM_DEBUG,
"\t*=*=*=*= %s =*=*=*=*\n",
data.labels[16]));
@@ -218,17 +195,14 @@ Test_DynAny::run_test (void)
DynamicAny::DynAny_var fa3 =
dynany_factory->create_dyn_any (in3
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
fa3->insert_short_seq (data.m_shortseq1
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
data.m_shortseq2 =
- fa3->get_short_seq (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
+ fa3->get_short_seq ();
+
bool good =
data.m_shortseq2->length () == data.m_shortseq1.length ();
-
+
if (good)
{
for (CORBA::ULong i = 0; i < data.m_shortseq1.length (); ++i)
@@ -251,7 +225,6 @@ Test_DynAny::run_test (void)
++this->error_count_;
}
- ACE_TRY_CHECK;
ACE_DEBUG ((LM_DEBUG,
"testing: constructor(TypeCode)/from_any/to_any\n"));
@@ -259,23 +232,19 @@ Test_DynAny::run_test (void)
DynamicAny::DynAny_var ftc3 =
dynany_factory->create_dyn_any_from_type_code (CORBA::_tc_ShortSeq
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
CORBA::Any in_any3;
in_any3 <<= data.m_shortseq1;
ftc3->from_any (in_any3
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
analyzer.analyze (ftc3.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::Any_var out_any3 = ftc3->to_any (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
+ CORBA::Any_var out_any3 = ftc3->to_any ();
+
CORBA::ShortSeq *outseq = 0;
out_any3.in () >>= outseq;
good =
outseq->length () == data.m_shortseq1.length ();
-
+
if (good)
{
for (CORBA::ULong i = 0; i < data.m_shortseq1.length (); ++i)
@@ -298,12 +267,9 @@ Test_DynAny::run_test (void)
++this->error_count_;
}
- ACE_TRY_CHECK;
- fa3->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ftc3->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ fa3->destroy ();
+ ftc3->destroy ();
}
ACE_CATCHANY
{