summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-03-04 15:48:27 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-03-04 15:48:27 +0000
commit7a2cf45161c468c3da6129e3656c7eb187045468 (patch)
tree3ac22c1b68692983538a2186125d40bf318bc73b
parent51a5af762a9d55682a0c18ade3f94932e9e76364 (diff)
downloadATCD-dyn-corba.tar.gz
ChangeLogTag: Tue Mar 4 09:42:18 2003 Jeff Parsons <j.parsons@vanderbilt.edu>dyn-corba
-rw-r--r--TAO/ChangeLog16
-rw-r--r--TAO/tests/Param_Test/anyop.cpp879
-rw-r--r--TAO/tests/Param_Test/anyop.dsp4
-rw-r--r--TAO/tests/Param_Test/client.dsp4
4 files changed, 209 insertions, 694 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 16648b91c18..2ceb28aa965 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,19 @@
+Tue Mar 4 09:42:18 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * tests/Param_Test/client.dsp:
+
+ Turned on RTTI for param_testC.cpp.
+
+ * tests/Param_Test/anyop.dsp:
+
+ Same as above and removed link to TAO_Messaging*.dsp.
+
+ * tests/Param_Test/anyop.cpp:
+
+ Re-added the var_array test, which now works, and added
+ tests of several other IDL types, testing for both
+ copying and non-copying insertion where applicable.
+
Mon Mar 3 22:01:48 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
* tao/Any.cpp:
diff --git a/TAO/tests/Param_Test/anyop.cpp b/TAO/tests/Param_Test/anyop.cpp
index 7f23a44385c..9a59d2d267b 100644
--- a/TAO/tests/Param_Test/anyop.cpp
+++ b/TAO/tests/Param_Test/anyop.cpp
@@ -20,25 +20,15 @@
#include "tao/debug.h"
#include "tao/Stub.h"
#include "ace/Get_Opt.h"
-#include "ace/High_Res_Timer.h"
-#include "ace/Stats.h"
-#include "ace/Sample_History.h"
-#include "ace/Sched_Params.h"
-ACE_RCSID(Param_Test, anyop, "$Id$")
+ACE_RCSID (Param_Test,
+ anyop,
+ "$Id$")
int
main (int argc, char *argv[])
{
- int priority =
- (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO)
- + ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2;
-
- ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO,
- priority,
- ACE_SCOPE_PROCESS));
-
- int n = 50000;
+ int n = 1024;
ACE_TRY_NEW_ENV
{
@@ -48,7 +38,7 @@ main (int argc, char *argv[])
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- ACE_Get_Opt get_opt (argc, argv, "dn:l:");
+ ACE_Get_Opt get_opt (argc, argv, "dn:");
int opt;
while ((opt = get_opt ()) != EOF)
@@ -73,335 +63,192 @@ main (int argc, char *argv[])
}
}
- CORBA::Boolean result = 0;
- int j;
+ for (int i = 0; i != n; ++i)
+ {
+ CORBA::Any any;
-#undef INSERTION
-//#define INSERTION
+ {
+ Param_Test::Var_Array var_array;
+ any <<= Param_Test::Var_Array_forany (var_array);
- {
- CORBA::Object_var obj =
- orb->string_to_object ("corbaloc:iiop:localhost:1234/Foo/Bar"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ Param_Test::Var_Array_forany forany;
- Param_Test_var param_test =
- Param_Test::_unchecked_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- TAO_Stub *stub = param_test->_stubobj ();
- stub->type_id = CORBA::string_dup ("IDL:Param_Test:1.0");
+ if (!(any >>= forany))
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Failure for Param_Test::Var_Array\n"));
+ }
+ Param_Test::Var_Array_var var =
+ Param_Test::Var_Array_dup (forany.in ());
+ any <<= Param_Test::Var_Array_forany (var.inout ());
- ACE_Sample_History history (n);
- ACE_hrtime_t test_start = ACE_OS::gethrtime ();
+ if (!(any >>= forany))
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Failure for Param_Test::Var_Array[2]\n"));
+ }
+ }
- for (j = 0; j != n; ++j)
{
- CORBA::Any any;
-#if defined (INSERTION)
- ACE_hrtime_t start = ACE_OS::gethrtime ();
+ CORBA::Object_var obj =
+ orb->string_to_object ("corbaloc:iiop:localhost:1234/Foo/Bar"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ Param_Test_var param_test =
+ Param_Test::_unchecked_narrow (obj.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ TAO_Stub *stub = param_test->_stubobj ();
+ stub->type_id = CORBA::string_dup ("IDL:Param_Test:1.0");
any <<= param_test.in ();
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- history.sample (now - start);
-
Param_Test_ptr o;
- result = any >>= o;
-#else
- any <<= param_test.in ();
-
- Param_Test_ptr o;
+ if (!(any >>= o))
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Cannot extract Param_Test (oh the horror)\n"));
+ }
+ CORBA::Boolean equiv =
+ param_test->_is_equivalent (o ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
- ACE_hrtime_t start = ACE_OS::gethrtime ();
+ if (!equiv)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Mismatched Param_Test extraction\n"));
+ }
- result = any >>= o;
+ CORBA::Object_ptr other;
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- history.sample (now - start);
-#endif
+ if (!(any >>= CORBA::Any::to_object (other)))
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Cannot extract Param_Test as Object\n"));
+ }
}
- ACE_hrtime_t test_end = ACE_OS::gethrtime ();
-
-#if defined (INSERTION)
- ACE_DEBUG ((LM_DEBUG,
- "Objref insertion test finished\n"));
-#else
- ACE_DEBUG ((LM_DEBUG,
- "Objref extraction test finished\n"));
-#endif
- ACE_DEBUG ((LM_DEBUG,
- "High resolution timer calibration...."));
- ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor ();
- ACE_DEBUG ((LM_DEBUG,
- "done\n"));
-
- ACE_Basic_Stats stats;
- history.collect_basic_stats (stats);
- stats.dump_results ("Total", gsf);
-
- ACE_Throughput_Stats::dump_throughput ("Total",
- gsf,
- test_end - test_start,
- stats.samples_count ());
- }
-
- ACE_DEBUG ((LM_DEBUG, "\n"));
-
- {
- ACE_Sample_History history (n);
- ACE_hrtime_t test_start = ACE_OS::gethrtime ();
-
- for (j = 0; j != n; ++j)
{
- CORBA::Any any;
CORBA::Short i = 123;
-#if defined (INSERTION)
- ACE_hrtime_t start = ACE_OS::gethrtime ();
-
any <<= i;
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- history.sample (now - start);
-
CORBA::Short o;
- result = any >>= o;
-#else
- any <<= i;
-
- CORBA::Short o;
-
- ACE_hrtime_t start = ACE_OS::gethrtime ();
-
- result = any >>= o;
-
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- history.sample (now - start);
-#endif
+ if (!(any >>= o)
+ || i != o)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Failure for CORBA::Short (%d,%d)\n",
+ i, o));
+ }
}
- ACE_hrtime_t test_end = ACE_OS::gethrtime ();
-
-#if defined (INSERTION)
- ACE_DEBUG ((LM_DEBUG,
- "Short insertion test finished\n"));
-#else
- ACE_DEBUG ((LM_DEBUG,
- "Short extraction test finished\n"));
-#endif
- ACE_DEBUG ((LM_DEBUG,
- "High resolution timer calibration...."));
- ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor ();
- ACE_DEBUG ((LM_DEBUG,
- "done\n"));
-
- ACE_Basic_Stats stats;
- history.collect_basic_stats (stats);
- stats.dump_results ("Total", gsf);
-
- ACE_Throughput_Stats::dump_throughput ("Total",
- gsf,
- test_end - test_start,
- stats.samples_count ());
- }
-
- ACE_DEBUG ((LM_DEBUG, "\n"));
-
- {
- ACE_Sample_History history (n);
- ACE_hrtime_t test_start = ACE_OS::gethrtime ();
-
- for (j = 0; j != n; ++j)
{
- CORBA::Any any;
CORBA::Long i = 123;
-#if defined (INSERTION)
- ACE_hrtime_t start = ACE_OS::gethrtime ();
-
any <<= i;
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- history.sample (now - start);
-
CORBA::Long o;
- result = any >>= o;
-#else
- any <<= i;
-
- CORBA::Long o;
+ if (!(any >>= o)
+ || i != o)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Failure for CORBA::Long (%d,%d)\n",
+ i, o));
+ }
+ }
- ACE_hrtime_t start = ACE_OS::gethrtime ();
+ {
+ CORBA::ULongLong i = 123;
+ any <<= i;
- result = any >>= o;
+ CORBA::ULongLong o;
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- history.sample (now - start);
+ if (!(any >>= o)
+ || i != o)
+ {
+#if defined (ACE_LACKS_LONGLONG_T)
+ char bufferi[32];
+ char buffero[32];
+ ACE_DEBUG ((LM_DEBUG,
+ "Failure for CORBA::ULongLong (%s,%s)\n",
+ i.as_string (bufferi),
+ o.as_string (buffero)));
+#else
+ ACE_DEBUG ((LM_DEBUG,
+ "Failure for CORBA::ULongLong (%Q,%Q)\n",
+ i, o));
#endif
+ }
}
- ACE_hrtime_t test_end = ACE_OS::gethrtime ();
-
-#if defined (INSERTION)
- ACE_DEBUG ((LM_DEBUG,
- "Long insertion test finished\n"));
-#else
- ACE_DEBUG ((LM_DEBUG,
- "Long extraction test finished\n"));
-#endif
- ACE_DEBUG ((LM_DEBUG,
- "High resolution timer calibration...."));
- ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor ();
- ACE_DEBUG ((LM_DEBUG,
- "done\n"));
-
- ACE_Basic_Stats stats;
- history.collect_basic_stats (stats);
- stats.dump_results ("Total", gsf);
-
- ACE_Throughput_Stats::dump_throughput ("Total",
- gsf,
- test_end - test_start,
- stats.samples_count ());
- }
-
- ACE_DEBUG ((LM_DEBUG, "\n"));
-
- {
- ACE_Sample_History history (n);
- ACE_hrtime_t test_start = ACE_OS::gethrtime ();
-
- for (j = 0; j != n; ++j)
{
- CORBA::Any any;
CORBA::Double i = 123;
-#if defined (INSERTION)
- ACE_hrtime_t start = ACE_OS::gethrtime ();
-
any <<= i;
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- history.sample (now - start);
-
CORBA::Double o;
- result = any >>= o;
-#else
- any <<= i;
-
- CORBA::Double o;
-
- ACE_hrtime_t start = ACE_OS::gethrtime ();
-
- result = any >>= o;
-
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- history.sample (now - start);
-#endif
+ if (!(any >>= o)
+ || i != o)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Failure for CORBA::Double (%f,%f)\n",
+ i, o));
+ }
}
- ACE_hrtime_t test_end = ACE_OS::gethrtime ();
-
-#if defined (INSERTION)
- ACE_DEBUG ((LM_DEBUG,
- "Double insertion test finished\n"));
-#else
- ACE_DEBUG ((LM_DEBUG,
- "Double extraction test finished\n"));
-#endif
- ACE_DEBUG ((LM_DEBUG,
- "High resolution timer calibration...."));
- ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor ();
- ACE_DEBUG ((LM_DEBUG,
- "done\n"));
-
- ACE_Basic_Stats stats;
- history.collect_basic_stats (stats);
- stats.dump_results ("Total", gsf);
-
- ACE_Throughput_Stats::dump_throughput ("Total",
- gsf,
- test_end - test_start,
- stats.samples_count ());
- }
-
- ACE_DEBUG ((LM_DEBUG, "\n"));
-
- {
- Param_Test::Fixed_Struct i;
- i.l = -7;
- i.c = 'c';
- i.s = 5;
- i.o = 255;
- i.f = 2.3f;
- i.b = 0;
- i.d = 3.1416;
-
- ACE_Sample_History history (n);
- ACE_hrtime_t test_start = ACE_OS::gethrtime ();
-
- for (j = 0; j != n; ++j)
{
CORBA::Any any;
-#if defined (INSERTION)
- ACE_hrtime_t start = ACE_OS::gethrtime ();
-
- any <<= i;
+ CORBA::Any *i = 0;
+ ACE_NEW_RETURN (i,
+ CORBA::Any,
+ -1);
+ *i <<= CORBA::Short (123);
+ any <<= *i;
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- history.sample (now - start);
+ const CORBA::Any *o;
+ CORBA::Short oo;
- Param_Test::Fixed_Struct *o;
+ if (!(any >>= o)
+ || !(*o >>= oo)
+ || 123 != oo)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Failure for CORBA::Any "
+ "(copying insertion, %d)\n",
+ oo));
+ }
- result = any >>= o;
-#else
any <<= i;
- Param_Test::Fixed_Struct *o;
+ if (!(any >>= o)
+ || !(*o >>= oo)
+ || 123 != oo)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Failure for CORBA::Any "
+ "(non-copying insertion, %d)\n",
+ oo));
+ }
+ }
- ACE_hrtime_t start = ACE_OS::gethrtime ();
+ {
+ const char i[] = "123";
+ any <<= i;
- result = any >>= o;
+ const char *o;
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- history.sample (now - start);
-#endif
+ if (!(any >>= o)
+ || ACE_OS::strcmp (i, o) != 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Failure for char* (%s,%s)\n",
+ i, o));
+ }
}
- ACE_hrtime_t test_end = ACE_OS::gethrtime ();
-
-#if defined (INSERTION)
- ACE_DEBUG ((LM_DEBUG,
- "Struct copying insertion test finished\n"));
-#else
- ACE_DEBUG ((LM_DEBUG,
- "Struct extraction test finished\n"));
-#endif
- ACE_DEBUG ((LM_DEBUG,
- "High resolution timer calibration...."));
- ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor ();
- ACE_DEBUG ((LM_DEBUG,
- "done\n"));
-
- ACE_Basic_Stats stats;
- history.collect_basic_stats (stats);
- stats.dump_results ("Total", gsf);
-
- ACE_Throughput_Stats::dump_throughput ("Total",
- gsf,
- test_end - test_start,
- stats.samples_count ());
- }
-
- ACE_DEBUG ((LM_DEBUG, "\n"));
-
- {
- ACE_Sample_History history (n);
- ACE_hrtime_t test_start = ACE_OS::gethrtime ();
- for (j = 0; j != n; ++j)
{
CORBA::Any any;
Param_Test::Fixed_Struct *i = 0;
@@ -416,433 +263,85 @@ main (int argc, char *argv[])
i->b = 0;
i->d = 3.1416;
-#if defined (INSERTION)
- ACE_hrtime_t start = ACE_OS::gethrtime ();
-
- any <<= i;
-
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- history.sample (now - start);
-
- Param_Test::Fixed_Struct *o;
-
- result = any >>= o;
-#else
- any <<= i;
-
+ any <<= *i;
Param_Test::Fixed_Struct *o;
+
+ if (!(any >>= o)
+ || o->l != i->l
+ || o->c != i->c
+ || o->s != i->s
+ || o->o != i->o
+ || o->f != i->f
+ || o->b != i->b
+ || o->d != i->d)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Failure for Fixed_Struct "
+ "(copying insertion)\n"));
+ }
- ACE_hrtime_t start = ACE_OS::gethrtime ();
-
- result = any >>= o;
-
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- history.sample (now - start);
-#endif
- }
-
- ACE_hrtime_t test_end = ACE_OS::gethrtime ();
-
-#if defined (INSERTION)
- ACE_DEBUG ((LM_DEBUG,
- "Struct non-copying insertion test finished\n"));
-#else
- ACE_DEBUG ((LM_DEBUG,
- "Struct extraction test finished\n"));
-#endif
- ACE_DEBUG ((LM_DEBUG,
- "High resolution timer calibration...."));
- ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor ();
- ACE_DEBUG ((LM_DEBUG,
- "done\n"));
-
- ACE_Basic_Stats stats;
- history.collect_basic_stats (stats);
- stats.dump_results ("Total", gsf);
-
- ACE_Throughput_Stats::dump_throughput ("Total",
- gsf,
- test_end - test_start,
- stats.samples_count ());
- }
-
- ACE_DEBUG ((LM_DEBUG, "\n"));
-
- {
- CORBA::ULong len = 1024;
- Param_Test::Long_Seq i (len);
- i.length (len);
-
- for (CORBA::ULong k = 0; k < len; ++k)
- {
- i[k] = 11;
- }
-
- ACE_Sample_History history (n);
- ACE_hrtime_t test_start = ACE_OS::gethrtime ();
-
- for (j = 0; j != n; ++j)
- {
- CORBA::Any any;
-#if defined (INSERTION)
- ACE_hrtime_t start = ACE_OS::gethrtime ();
-
- any <<= i;
-
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- history.sample (now - start);
-
- Param_Test::Long_Seq *o;
-
- result = any >>= o;
-#else
any <<= i;
-
- Param_Test::Long_Seq *o;
-
- ACE_hrtime_t start = ACE_OS::gethrtime ();
-
- result = any >>= o;
-
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- history.sample (now - start);
-#endif
+
+ if (!(any >>= o)
+ || o->l != i->l
+ || o->c != i->c
+ || o->s != i->s
+ || o->o != i->o
+ || o->f != i->f
+ || o->b != i->b
+ || o->d != i->d)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Failure for Fixed_Struct "
+ "(non-copying insertion)\n"));
+ }
}
- ACE_hrtime_t test_end = ACE_OS::gethrtime ();
-
-#if defined (INSERTION)
- ACE_DEBUG ((LM_DEBUG,
- "Sequence copying insertion test finished\n"));
-#else
- ACE_DEBUG ((LM_DEBUG,
- "Sequence extraction test finished\n"));
-#endif
- ACE_DEBUG ((LM_DEBUG,
- "High resolution timer calibration...."));
- ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor ();
- ACE_DEBUG ((LM_DEBUG,
- "done\n"));
-
- ACE_Basic_Stats stats;
- history.collect_basic_stats (stats);
- stats.dump_results ("Total", gsf);
-
- ACE_Throughput_Stats::dump_throughput ("Total",
- gsf,
- test_end - test_start,
- stats.samples_count ());
- }
-
- ACE_DEBUG ((LM_DEBUG, "\n"));
-
- {
- CORBA::ULong len = 1024;
- ACE_Sample_History history (n);
- ACE_hrtime_t test_start = ACE_OS::gethrtime ();
- for (j = 0; j != n; ++j)
{
+ CORBA::ULong len = 3;
CORBA::Any any;
Param_Test::Long_Seq *i = 0;
ACE_NEW_RETURN (i,
Param_Test::Long_Seq (len),
-1);
i->length (len);
-
+
for (CORBA::ULong k = 0; k < len; ++k)
{
- (*i)[k] = 11;
+ (*i)[k] = k;
}
-#if defined (INSERTION)
- ACE_hrtime_t start = ACE_OS::gethrtime ();
-
- any <<= i;
-
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- history.sample (now - start);
-
- Param_Test::Long_Seq *o;
-
- result = any >>= o;
-#else
- any <<= i;
-
+ any <<= *i;
Param_Test::Long_Seq *o;
- ACE_hrtime_t start = ACE_OS::gethrtime ();
-
- result = any >>= o;
-
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- history.sample (now - start);
-#endif
- }
-
- ACE_hrtime_t test_end = ACE_OS::gethrtime ();
-
-#if defined (INSERTION)
- ACE_DEBUG ((LM_DEBUG,
- "Sequence non-copying insertion test finished\n"));
-#else
- ACE_DEBUG ((LM_DEBUG,
- "Sequence extraction test finished\n"));
-#endif
- ACE_DEBUG ((LM_DEBUG,
- "High resolution timer calibration...."));
- ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor ();
- ACE_DEBUG ((LM_DEBUG,
- "done\n"));
-
- ACE_Basic_Stats stats;
- history.collect_basic_stats (stats);
- stats.dump_results ("Total", gsf);
-
- ACE_Throughput_Stats::dump_throughput ("Total",
- gsf,
- test_end - test_start,
- stats.samples_count ());
- }
-
- ACE_DEBUG ((LM_DEBUG, "\n"));
-
- {
- ACE_Sample_History history (n);
- ACE_hrtime_t test_start = ACE_OS::gethrtime ();
-
- for (j = 0; j != n; ++j)
- {
- CORBA::Any any;
- CORBA::Any i;
- i <<= CORBA::Short (123);
-#if defined (INSERTION)
- ACE_hrtime_t start = ACE_OS::gethrtime ();
-
- any <<= i;
-
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- history.sample (now - start);
-
- const CORBA::Any *o;
- CORBA::Short oo;
-
- result = any >>= o;
- result = *o >>= oo;
-#else
- any <<= i;
-
- const CORBA::Any *o;
- CORBA::Short oo;
-
- ACE_hrtime_t start = ACE_OS::gethrtime ();
-
- result = any >>= o;
-
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- history.sample (now - start);
-
- result = *o >>= oo;
-#endif
- }
-
- ACE_hrtime_t test_end = ACE_OS::gethrtime ();
-
-#if defined (INSERTION)
- ACE_DEBUG ((LM_DEBUG,
- "Any copying insertion test finished\n"));
-#else
- ACE_DEBUG ((LM_DEBUG,
- "Any extraction test finished\n"));
-#endif
- ACE_DEBUG ((LM_DEBUG,
- "High resolution timer calibration...."));
- ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor ();
- ACE_DEBUG ((LM_DEBUG,
- "done\n"));
-
- ACE_Basic_Stats stats;
- history.collect_basic_stats (stats);
- stats.dump_results ("Total", gsf);
-
- ACE_Throughput_Stats::dump_throughput ("Total",
- gsf,
- test_end - test_start,
- stats.samples_count ());
- }
-
- ACE_DEBUG ((LM_DEBUG, "\n"));
-
- {
- ACE_Sample_History history (n);
- ACE_hrtime_t test_start = ACE_OS::gethrtime ();
-
- for (j = 0; j != n; ++j)
- {
- CORBA::Any any;
- CORBA::Any *i = 0;
- ACE_NEW_RETURN (i,
- CORBA::Any,
- -1);
- *i <<= CORBA::Short (123);
-#if defined (INSERTION)
- ACE_hrtime_t start = ACE_OS::gethrtime ();
-
- any <<= i;
-
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- history.sample (now - start);
-
- const CORBA::Any *o;
- CORBA::Short oo;
-
- result = any >>= o;
- result = *o >>= oo;
-#else
- any <<= i;
-
- const CORBA::Any *o;
- CORBA::Short oo;
-
- ACE_hrtime_t start = ACE_OS::gethrtime ();
-
- result = any >>= o;
-
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- history.sample (now - start);
-
- result = *o >>= oo;
-#endif
- }
-
- ACE_hrtime_t test_end = ACE_OS::gethrtime ();
-
-#if defined (INSERTION)
- ACE_DEBUG ((LM_DEBUG,
- "Any non-copying insertion test finished\n"));
-#else
- ACE_DEBUG ((LM_DEBUG,
- "Any extraction test finished\n"));
-#endif
- ACE_DEBUG ((LM_DEBUG,
- "High resolution timer calibration...."));
- ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor ();
- ACE_DEBUG ((LM_DEBUG,
- "done\n"));
-
- ACE_Basic_Stats stats;
- history.collect_basic_stats (stats);
- stats.dump_results ("Total", gsf);
-
- ACE_Throughput_Stats::dump_throughput ("Total",
- gsf,
- test_end - test_start,
- stats.samples_count ());
- }
-
- ACE_DEBUG ((LM_DEBUG, "\n"));
-
- {
- ACE_Sample_History history (n);
- ACE_hrtime_t test_start = ACE_OS::gethrtime ();
-
- for (j = 0; j != n; ++j)
- {
- CORBA::Any any;
- const char i[] = "1234567890";
-#if defined (INSERTION)
- ACE_hrtime_t start = ACE_OS::gethrtime ();
-
- any <<= i;
-
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- history.sample (now - start);
-
- const char *o;
-
- result = any >>= o;
-#else
- any <<= i;
-
- const char *o;
-
- ACE_hrtime_t start = ACE_OS::gethrtime ();
-
- result = any >>= o;
-
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- history.sample (now - start);
-#endif
- }
-
- ACE_hrtime_t test_end = ACE_OS::gethrtime ();
+ if (!(any >>= o)
+ || (*i)[0] != (*o)[0]
+ || (*i)[1] != (*o)[1]
+ || (*i)[2] != (*o)[2])
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Failure for Long_Seq "
+ "(copying insertion)\n"));
+ }
-#if defined (INSERTION)
- ACE_DEBUG ((LM_DEBUG,
- "String insertion test finished\n"));
-#else
- ACE_DEBUG ((LM_DEBUG,
- "String extraction test finished\n"));
-#endif
- ACE_DEBUG ((LM_DEBUG,
- "High resolution timer calibration...."));
- ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor ();
- ACE_DEBUG ((LM_DEBUG,
- "done\n"));
-
- ACE_Basic_Stats stats;
- history.collect_basic_stats (stats);
- stats.dump_results ("Total", gsf);
-
- ACE_Throughput_Stats::dump_throughput ("Total",
- gsf,
- test_end - test_start,
- stats.samples_count ());
- }
-
- ACE_DEBUG ((LM_DEBUG, "\n"));
-
- {
- ACE_Sample_History history (n);
- ACE_hrtime_t test_start = ACE_OS::gethrtime ();
-
- for (j = 0; j != n; ++j)
- {
- CORBA::Any any;
- const char i[] = "1234567890";
any <<= i;
- CORBA::Any copy;
-
- ACE_hrtime_t start = ACE_OS::gethrtime ();
- copy = any;
-
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- history.sample (now - start);
+ if (!(any >>= o)
+ || (*i)[0] != (*o)[0]
+ || (*i)[1] != (*o)[1]
+ || (*i)[2] != (*o)[2])
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Failure for Long_Seq "
+ "(non-copying insertion)\n"));
+ }
}
-
- ACE_hrtime_t test_end = ACE_OS::gethrtime ();
-
- ACE_DEBUG ((LM_DEBUG,
- "Copy test finished\n"));
- ACE_DEBUG ((LM_DEBUG,
- "High resolution timer calibration...."));
- ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor ();
- ACE_DEBUG ((LM_DEBUG,
- "done\n"));
-
- ACE_Basic_Stats stats;
- history.collect_basic_stats (stats);
- stats.dump_results ("Total", gsf);
-
- ACE_Throughput_Stats::dump_throughput ("Total",
- gsf,
- test_end - test_start,
- stats.samples_count ());
- }
+ }
}
ACE_CATCHANY
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Basic_Types");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "IDL Types");
return 1;
}
ACE_ENDTRY;
diff --git a/TAO/tests/Param_Test/anyop.dsp b/TAO/tests/Param_Test/anyop.dsp
index fdd2650d91b..12c61d914b2 100644
--- a/TAO/tests/Param_Test/anyop.dsp
+++ b/TAO/tests/Param_Test/anyop.dsp
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 TAO.lib ace.lib TAO_Messaging.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\tao" /libpath:"..\..\..\ace" /libpath:"..\..\tao\Messaging"
+# ADD LINK32 TAO.lib ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\tao" /libpath:"..\..\..\ace" /libpath:"..\..\tao\Messaging"
!ELSEIF "$(CFG)" == "Param_Test Anyop - Win32 Debug"
@@ -76,7 +76,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 TAOd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\tao" /libpath:"..\..\..\ace" /libpath:"..\..\tao\Messaging"
+# ADD LINK32 TAOd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\tao" /libpath:"..\..\..\ace"
!ENDIF
diff --git a/TAO/tests/Param_Test/client.dsp b/TAO/tests/Param_Test/client.dsp
index 92971f8d317..a71f72aaeee 100644
--- a/TAO/tests/Param_Test/client.dsp
+++ b/TAO/tests/Param_Test/client.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GR- /GX /O2 /I "..\..\\" /I "..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\\" /I "..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
@@ -67,7 +67,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GR- /GX /Zi /Od /I "..\..\\" /I "..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\\" /I "..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"