summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-02-25 00:33:52 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-02-25 00:33:52 +0000
commit3e4f131baa9adb72edc612ab4a5f693136323ee8 (patch)
tree4b32273158f1cfd3ec048140a0c476e0a6fc53c9
parent8e32c78a46987e5959dcf1ac40f8478420830f3b (diff)
downloadATCD-3e4f131baa9adb72edc612ab4a5f693136323ee8.tar.gz
Activated the multidimensional array test.
-rw-r--r--TAO/tests/Param_Test/client.dsp8
-rw-r--r--TAO/tests/Param_Test/driver.cpp6
-rw-r--r--TAO/tests/Param_Test/multdim_array.cpp45
-rw-r--r--TAO/tests/Param_Test/multdim_array.h10
-rw-r--r--TAO/tests/Param_Test/param_test.idl4
-rw-r--r--TAO/tests/Param_Test/param_test_i.cpp3
-rw-r--r--TAO/tests/Param_Test/param_test_i.h2
-rwxr-xr-xTAO/tests/Param_Test/run_test.pl2
-rw-r--r--TAO/tests/Param_Test/tests.h2
9 files changed, 46 insertions, 36 deletions
diff --git a/TAO/tests/Param_Test/client.dsp b/TAO/tests/Param_Test/client.dsp
index 3036894e6e8..75feb72007d 100644
--- a/TAO/tests/Param_Test/client.dsp
+++ b/TAO/tests/Param_Test/client.dsp
@@ -155,6 +155,10 @@ SOURCE=.\helper.cpp
# End Source File
# Begin Source File
+SOURCE=.\multdim_array.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\nested_struct.cpp
# End Source File
# Begin Source File
@@ -327,6 +331,10 @@ SOURCE=.\longlong.h
# End Source File
# Begin Source File
+SOURCE=.\multdim_array.h
+# End Source File
+# Begin Source File
+
SOURCE=.\nested_struct.h
# End Source File
# Begin Source File
diff --git a/TAO/tests/Param_Test/driver.cpp b/TAO/tests/Param_Test/driver.cpp
index 38c23120898..7cc48ec6147 100644
--- a/TAO/tests/Param_Test/driver.cpp
+++ b/TAO/tests/Param_Test/driver.cpp
@@ -583,7 +583,6 @@ Driver::run (void)
delete client;
}
break;
-#if 0
case Options::TEST_MULTDIM_ARRAY:
{
Param_Test_Client<Test_Multdim_Array> *client = new
@@ -597,7 +596,6 @@ Driver::run (void)
delete client;
}
break;
-#endif
default:
break;
}
@@ -658,9 +656,7 @@ template class Param_Test_Client<Test_Exception>;
template class Param_Test_Client<Test_Big_Union>;
template class Param_Test_Client<Test_Recursive_Union>;
template class Param_Test_Client<Test_Complex_Any>;
-#if 0
template class Param_Test_Client<Test_Multdim_Array>;
-#endif
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
@@ -699,7 +695,5 @@ template class Param_Test_Client<Test_Multdim_Array>;
#pragma instantiate Param_Test_Client<Test_Big_Union>
#pragma instantiate Param_Test_Client<Test_Recursive_Union>
#pragma instantiate Param_Test_Client<Test_Complex_Any>
-#if 0
#pragma instantiate Param_Test_Client<Test_Multdim_Array>
-#endif
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/tests/Param_Test/multdim_array.cpp b/TAO/tests/Param_Test/multdim_array.cpp
index 618dfbd312c..c90a63531fd 100644
--- a/TAO/tests/Param_Test/multdim_array.cpp
+++ b/TAO/tests/Param_Test/multdim_array.cpp
@@ -13,7 +13,7 @@
// Bala
//
// ============================================================================
-# if 0
+
#include "helper.h"
#include "multdim_array.h"
@@ -26,6 +26,9 @@ ACE_RCSID(Param_Test, fixed_array, "$Id$")
Test_Multdim_Array::Test_Multdim_Array (void)
: opname_ (CORBA::string_dup ("test_multdim_array")),
+ in_ (new Param_Test::Multdim_Array),
+ inout_ (new Param_Test::Multdim_Array),
+ out_ (new Param_Test::Multdim_Array),
ret_ (new Param_Test::Multdim_Array)
{
}
@@ -71,6 +74,14 @@ Test_Multdim_Array::init_parameters (Param_Test_ptr /*objref*/,
int
Test_Multdim_Array::reset_parameters (void)
{
+ // free the in value array
+ Param_Test::Multdim_Array_free (this->in_._retn ());
+ // needed for repeated DII calls
+ this->in_ = new Param_Test::Multdim_Array;
+ // free the inout value array
+ Param_Test::Multdim_Array_free (this->inout_._retn ());
+ // needed for repeated DII calls
+ this->inout_ = new Param_Test::Multdim_Array;
for (CORBA::ULong i=0; i < Param_Test::DIM2; i++)
{
@@ -83,6 +94,10 @@ Test_Multdim_Array::reset_parameters (void)
}
}
}
+ // free the out value array
+ Param_Test::Multdim_Array_free (this->out_._retn ());
+ // needed for repeated DII calls
+ this->out_ = new Param_Test::Multdim_Array;
// free the return value array
Param_Test::Multdim_Array_free (this->ret_._retn ());
// needed for repeated DII calls
@@ -94,9 +109,9 @@ int
Test_Multdim_Array::run_sii_test (Param_Test_ptr objref,
CORBA::Environment &ACE_TRY_ENV)
{
- this->ret_ = objref->test_multdim_array (this->in_,
- this->inout_,
- this->out_,
+ this->ret_ = objref->test_multdim_array (this->in_.in (),
+ this->inout_.inout (),
+ this->out_.inout (),
ACE_TRY_ENV);
return (ACE_TRY_ENV.exception () ? -1:0);
}
@@ -109,15 +124,15 @@ Test_Multdim_Array::add_args (CORBA::NVList_ptr param_list,
// We provide the top level memory
// the Any does not own any of these
CORBA::Any in_arg (Param_Test::_tc_Multdim_Array,
- this->in_,
+ this->in_.inout (),
0);
CORBA::Any inout_arg (Param_Test::_tc_Multdim_Array,
- this->inout_,
+ this->inout_.inout (),
0);
CORBA::Any out_arg (Param_Test::_tc_Multdim_Array,
- this->out_,
+ this->out_.inout (),
0);
// add parameters
@@ -147,9 +162,12 @@ Test_Multdim_Array::add_args (CORBA::NVList_ptr param_list,
CORBA::Boolean
Test_Multdim_Array::check_validity (void)
{
- if (this->compare (this->in_, this->inout_) &&
- this->compare (this->in_, this->out_) &&
- this->compare (this->in_, this->ret_.in ()))
+ if (this->compare (this->in_.in (),
+ this->inout_.in ()) &&
+ this->compare (this->in_.in (),
+ this->out_.in ()) &&
+ this->compare (this->in_.in (),
+ this->ret_.in ()))
return 1;
else
return 0;
@@ -184,11 +202,11 @@ void
Test_Multdim_Array::print_values (void)
{
ACE_DEBUG ((LM_DEBUG, "IN array\n"));
- this->print (this->in_);
+ this->print (this->in_.in ());
ACE_DEBUG ((LM_DEBUG, "INOUT array\n"));
- this->print (this->inout_);
+ this->print (this->inout_.in ());
ACE_DEBUG ((LM_DEBUG, "OUT array\n"));
- this->print (this->out_);
+ this->print (this->out_.in ());
ACE_DEBUG ((LM_DEBUG, "RET array\n"));
this->print (this->ret_.in ());
}
@@ -208,4 +226,3 @@ Test_Multdim_Array::print (const Param_Test::Multdim_Array_slice *a)
}
}
-#endif
diff --git a/TAO/tests/Param_Test/multdim_array.h b/TAO/tests/Param_Test/multdim_array.h
index 739f34782a9..9e68775b7bf 100644
--- a/TAO/tests/Param_Test/multdim_array.h
+++ b/TAO/tests/Param_Test/multdim_array.h
@@ -22,7 +22,7 @@
#include "param_testCli.h"
// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
-// test fixed arrays
+// test fixed size multidimensional arrays
// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
class Test_Multdim_Array
{
@@ -75,17 +75,17 @@ private:
char *opname_;
// operation name
- Param_Test::Multdim_Array in_;
+ Param_Test::Multdim_Array_var in_;
// in parameter
- Param_Test::Multdim_Array inout_;
+ Param_Test::Multdim_Array_var inout_;
// inout parameter
- Param_Test::Multdim_Array out_;
+ Param_Test::Multdim_Array_var out_;
// out parameter
Param_Test::Multdim_Array_var ret_;
// return value
};
-#endif /* PARAM_TEST_FIXED_ARRAY_H */
+#endif /* PARAM_TEST_MULTDIM_ARRAY_H */
diff --git a/TAO/tests/Param_Test/param_test.idl b/TAO/tests/Param_Test/param_test.idl
index 67d24e513ac..ca21de43115 100644
--- a/TAO/tests/Param_Test/param_test.idl
+++ b/TAO/tests/Param_Test/param_test.idl
@@ -363,15 +363,13 @@ interface Param_Test
// dimensional array. The following will define a 3-dimensional array of size
// DIM1 X DIM2 X DIM3
const unsigned long DIM3 = 3;
-# if 0
+
typedef Fixed_Array Multdim_Array [DIM2][DIM3];
Multdim_Array test_multdim_array (in Multdim_Array m1,
inout Multdim_Array m2,
out Multdim_Array m3);
-#endif
-
// sequence of typecodes
// typedef sequence<TypeCode> TypeCodeSeq;
// TypeCodeSeq test_tcseq (in TypeCodeSeq t1, inout TypeCodeSeq t2, out TypeCodeSeq t3);
diff --git a/TAO/tests/Param_Test/param_test_i.cpp b/TAO/tests/Param_Test/param_test_i.cpp
index 7a7d06ec53b..5e42830edd3 100644
--- a/TAO/tests/Param_Test/param_test_i.cpp
+++ b/TAO/tests/Param_Test/param_test_i.cpp
@@ -990,7 +990,6 @@ Param_Test_i::test_complex_any (const CORBA::Any &a1,
return ret._retn ();
}
-#if 0
Param_Test::Multdim_Array_slice *
Param_Test_i::test_multdim_array (const Param_Test::Multdim_Array a1,
Param_Test::Multdim_Array a2,
@@ -1006,8 +1005,6 @@ Param_Test_i::test_multdim_array (const Param_Test::Multdim_Array a1,
return ret;
}
-#endif
-
void
Param_Test_i::shutdown (CORBA::Environment &)
ACE_THROW_SPEC ((CORBA::SystemException))
diff --git a/TAO/tests/Param_Test/param_test_i.h b/TAO/tests/Param_Test/param_test_i.h
index 8d617e0cb1a..cfa7443d367 100644
--- a/TAO/tests/Param_Test/param_test_i.h
+++ b/TAO/tests/Param_Test/param_test_i.h
@@ -313,7 +313,6 @@ public:
CORBA::Environment &env)
ACE_THROW_SPEC ((CORBA::SystemException));
-# if 0
// Test for multi dimensional arrays
virtual Param_Test::Multdim_Array_slice *
test_multdim_array (const Param_Test::Multdim_Array,
@@ -322,7 +321,6 @@ public:
CORBA::Environment &)
ACE_THROW_SPEC ((CORBA::SystemException));
-#endif
void shutdown (CORBA::Environment &env)
ACE_THROW_SPEC ((CORBA::SystemException));
diff --git a/TAO/tests/Param_Test/run_test.pl b/TAO/tests/Param_Test/run_test.pl
index 489cef322c6..b534c1f0101 100755
--- a/TAO/tests/Param_Test/run_test.pl
+++ b/TAO/tests/Param_Test/run_test.pl
@@ -61,7 +61,7 @@ sub run_test
"ub_strseq", "bd_strseq", "ub_wstrseq", "bd_wstrseq",
"var_struct", "nested_struct", "recursive_struct",
"ub_struct_seq", "bd_struct_seq",
- "ub_array_seq", "bd_array_seq",
+ "ub_array_seq", "bd_array_seq", "multdim_array",
"any", "objref", "objref_sequence", "objref_struct",
"any_sequence",
"ub_short_sequence", "ub_long_sequence",
diff --git a/TAO/tests/Param_Test/tests.h b/TAO/tests/Param_Test/tests.h
index dc6cbaf44d8..92b2329b877 100644
--- a/TAO/tests/Param_Test/tests.h
+++ b/TAO/tests/Param_Test/tests.h
@@ -53,7 +53,5 @@
#include "big_union.h"
#include "recursive_union.h"
#include "complex_any.h"
-#if 0
#include "multdim_array.h"
-#endif
#endif /* if !defined */