summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>1999-04-11 01:49:53 +0000
committerbala <balanatarajan@users.noreply.github.com>1999-04-11 01:49:53 +0000
commit105fb7fb7c58ce9f2a48d6713eaa75d0ceea4b0c (patch)
tree2a94008bfa1638587fb8b9ef0ab0226c221eae0f
parentd9f79851475c28db11bb87e1a90f54ea253e5b69 (diff)
downloadATCD-105fb7fb7c58ce9f2a48d6713eaa75d0ceea4b0c.tar.gz
Added test code for Multi_Dimensional arrays
-rw-r--r--TAO/tests/Param_Test/Makefile3
-rw-r--r--TAO/tests/Param_Test/driver.cpp16
-rw-r--r--TAO/tests/Param_Test/options.cpp2
-rw-r--r--TAO/tests/Param_Test/param_test.idl3
-rw-r--r--TAO/tests/Param_Test/param_test_i.cpp14
-rw-r--r--TAO/tests/Param_Test/param_test_i.h20
-rw-r--r--TAO/tests/Param_Test/tests.h1
7 files changed, 48 insertions, 11 deletions
diff --git a/TAO/tests/Param_Test/Makefile b/TAO/tests/Param_Test/Makefile
index a87c8145073..55b49b0b855 100644
--- a/TAO/tests/Param_Test/Makefile
+++ b/TAO/tests/Param_Test/Makefile
@@ -56,7 +56,8 @@ CLI_FILES = param_testCli \
var_array \
var_struct \
except \
- big_union
+ big_union \
+ multdim_array
PARAM_TEST_SVR_OBJS = $(addsuffix .o,$(SVR_FILES))
PARAM_TEST_CLT_OBJS = $(addsuffix .o,$(CLI_FILES))
diff --git a/TAO/tests/Param_Test/driver.cpp b/TAO/tests/Param_Test/driver.cpp
index 32de5be432e..c398d4a4d78 100644
--- a/TAO/tests/Param_Test/driver.cpp
+++ b/TAO/tests/Param_Test/driver.cpp
@@ -470,7 +470,19 @@ Driver::run (void)
delete client;
}
break;
-
+ case Options::TEST_MULTDIM_ARRAY:
+ {
+ Param_Test_Client<Test_Multdim_Array> *client = new
+ Param_Test_Client<Test_Multdim_Array> (this->orb_.in (),
+ this->objref_.in(),
+ new Test_Multdim_Array);
+ if (opt->invoke_type () == Options::SII)
+ retstatus = client->run_sii_test ();
+ else
+ retstatus = client->run_dii_test ();
+ delete client;
+ }
+ break;
default:
break;
}
@@ -522,6 +534,7 @@ template class Param_Test_Client<Test_Fixed_Array>;
template class Param_Test_Client<Test_Var_Array>;
template class Param_Test_Client<Test_Exception>;
template class Param_Test_Client<Test_Big_Union>;
+template class Param_Test_Client<Test_Multdim_Array>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
@@ -551,5 +564,6 @@ template class Param_Test_Client<Test_Big_Union>;
#pragma instantiate Param_Test_Client<Test_Var_Array>
#pragma instantiate Param_Test_Client<Test_Exception>
#pragma instantiate Param_Test_Client<Test_Big_Union>
+#pragma instantiate Param_Test_Client<Test_Multdim_Array>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/tests/Param_Test/options.cpp b/TAO/tests/Param_Test/options.cpp
index 3a6b9c0e18e..021832240ff 100644
--- a/TAO/tests/Param_Test/options.cpp
+++ b/TAO/tests/Param_Test/options.cpp
@@ -139,7 +139,7 @@ Options::parse_args (int argc, char **argv)
this->test_type_ = Options::TEST_EXCEPTION;
else if (!ACE_OS::strcmp (get_opts.optarg, "big_union"))
this->test_type_ = Options::TEST_BIG_UNION;
- break;
+ break;
case '?':
default:
diff --git a/TAO/tests/Param_Test/param_test.idl b/TAO/tests/Param_Test/param_test.idl
index 126ee1dd6cc..60587735e7c 100644
--- a/TAO/tests/Param_Test/param_test.idl
+++ b/TAO/tests/Param_Test/param_test.idl
@@ -266,7 +266,6 @@ interface Param_Test
inout Big_Union u2,
out Big_Union u3);
-#if 0
// multidimensional arrays (fixed). The following will give rise to a 3
// dimensional array. The following will define a 3-dimensional array of size
// DIM1 X DIM2 X DIM3
@@ -276,7 +275,7 @@ interface Param_Test
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;
diff --git a/TAO/tests/Param_Test/param_test_i.cpp b/TAO/tests/Param_Test/param_test_i.cpp
index fe5bf5bf292..257724ad839 100644
--- a/TAO/tests/Param_Test/param_test_i.cpp
+++ b/TAO/tests/Param_Test/param_test_i.cpp
@@ -782,6 +782,20 @@ Param_Test_i::test_big_union (const Param_Test::Big_Union& u1,
return ret._retn ();
}
+Param_Test::Multdim_Array_slice *
+Param_Test_i::test_multdim_array (const Param_Test::Multdim_Array a1,
+ Param_Test::Multdim_Array a2,
+ Param_Test::Multdim_Array_out a3,
+ CORBA::Environment &)
+{
+ Param_Test::Multdim_Array_slice *ret;
+
+ Param_Test::Multdim_Array_copy (a2, a1);
+ Param_Test::Multdim_Array_copy (a3, a1);
+ ret = Param_Test::Multdim_Array_dup (a1);
+ return ret;
+}
+
void
Param_Test_i::shutdown (CORBA::Environment &)
{
diff --git a/TAO/tests/Param_Test/param_test_i.h b/TAO/tests/Param_Test/param_test_i.h
index e795e6aa869..77da2bb01fd 100644
--- a/TAO/tests/Param_Test/param_test_i.h
+++ b/TAO/tests/Param_Test/param_test_i.h
@@ -228,14 +228,22 @@ public:
CORBA::ULong_out s3,
CORBA::Environment &env);
- void shutdown (CORBA::Environment &env);
-
virtual Param_Test::Big_Union*
- test_big_union (const Param_Test::Big_Union& u1,
- Param_Test::Big_Union& u2,
- Param_Test::Big_Union_out u3,
- CORBA::Environment &env);
+ test_big_union (const Param_Test::Big_Union& u1,
+ Param_Test::Big_Union& u2,
+ Param_Test::Big_Union_out u3,
+ CORBA::Environment &env);
+
+ // Test for multi dimensional arrays
+ virtual Param_Test::Multdim_Array_slice *
+ test_multdim_array (const Param_Test::Multdim_Array,
+ Param_Test::Multdim_Array ,
+ Param_Test::Multdim_Array_out ,
+ CORBA::Environment &);
+
+ void shutdown (CORBA::Environment &env);
+
private:
Coffee_i obj_;
// the coffee object reference we maintain
diff --git a/TAO/tests/Param_Test/tests.h b/TAO/tests/Param_Test/tests.h
index 739210f293a..2af44506403 100644
--- a/TAO/tests/Param_Test/tests.h
+++ b/TAO/tests/Param_Test/tests.h
@@ -44,5 +44,6 @@
#include "var_struct.h"
#include "except.h"
#include "big_union.h"
+#include "multdim_array.h"
#endif /* if !defined */