summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-09-07 16:01:25 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-09-07 16:01:25 +0000
commit671a15f6d25efa7ba2e6eefbb9ccd46580296852 (patch)
treeb85fea17ff34800fa4d3719277424dc2924a2a55
parentb8c9f4bb12a65e8e3238cc21bb961dbb17378115 (diff)
downloadATCD-671a15f6d25efa7ba2e6eefbb9ccd46580296852.tar.gz
ChangeLogTag: Tue Sep 7 16:00:49 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--ChangeLog27
-rw-r--r--tests/Alt_Mapping/alt_mapping.idl21
-rw-r--r--tests/Alt_Mapping/alt_mapping.mpc5
-rw-r--r--tests/Alt_Mapping/alt_mapping_i.cpp30
-rw-r--r--tests/Alt_Mapping/alt_mapping_i.h12
-rw-r--r--tests/Alt_Mapping/driver.cpp34
-rw-r--r--tests/Alt_Mapping/helper.cpp6
-rw-r--r--tests/Alt_Mapping/helper.h1
-rw-r--r--tests/Alt_Mapping/options.cpp4
-rw-r--r--tests/Alt_Mapping/options.h4
-rwxr-xr-xtests/Alt_Mapping/run_test.pl2
-rw-r--r--tests/Alt_Mapping/tests.h2
-rw-r--r--tests/Alt_Mapping/ub_long_seq.cpp187
-rw-r--r--tests/Alt_Mapping/ub_long_seq.h73
-rw-r--r--tests/Alt_Mapping/ub_octet_seq.cpp187
-rw-r--r--tests/Alt_Mapping/ub_octet_seq.h73
-rw-r--r--tests/Alt_Mapping/ub_str_seq.h7
-rw-r--r--tests/Alt_Mapping/ub_string.h7
-rw-r--r--tests/Alt_Mapping/ub_struct_seq.h1
19 files changed, 668 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index c835bfbcbde..cc6a7e8e9a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,30 @@
+Tue Sep 7 16:00:49 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * tests/Alt_Mapping/ub_long_seq.h:
+ * tests/Alt_Mapping/ub_octet_seq.cpp:
+ * tests/Alt_Mapping/ub_octet_seq.h:
+ * tests/Alt_Mapping/ub_long_seq.cpp:
+
+ New files, adding test coverage for
+ sequences of longs and octets.
+
+ * tests/Alt_Mapping/options.h:
+ * tests/Alt_Mapping/ub_string.h:
+ * tests/Alt_Mapping/alt_mapping_i.cpp:
+ * tests/Alt_Mapping/tests.h:
+ * tests/Alt_Mapping/alt_mapping_i.h:
+ * tests/Alt_Mapping/ub_str_seq.h:
+ * tests/Alt_Mapping/helper.cpp:
+ * tests/Alt_Mapping/alt_mapping.idl:
+ * tests/Alt_Mapping/helper.h:
+ * tests/Alt_Mapping/ub_struct_seq.h:
+ * tests/Alt_Mapping/alt_mapping.mpc:
+ * tests/Alt_Mapping/options.cpp:
+ * tests/Alt_Mapping/driver.cpp:
+ * tests/Alt_Mapping/run_test.pl:
+
+ Related and cosmetic changes.
+
Mon Sep 6 19:42:08 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
* tests/Alt_Mapping/ub_str_seq.cpp:
diff --git a/tests/Alt_Mapping/alt_mapping.idl b/tests/Alt_Mapping/alt_mapping.idl
index 6869d40f344..780007a0921 100644
--- a/tests/Alt_Mapping/alt_mapping.idl
+++ b/tests/Alt_Mapping/alt_mapping.idl
@@ -1,6 +1,19 @@
// $Id$
#include "tao/StringSeq.pidl"
+#include "tao/LongSeq.pidl"
+#include "tao/OctetSeq.pidl"
+
+interface Coffee
+{
+ struct Desc
+ {
+ string name;
+ };
+
+ attribute Desc description;
+ /// Provides us the coffee object type.s
+};
interface Alt_Mapping
{
@@ -29,6 +42,14 @@ interface Alt_Mapping
inout CORBA::StringSeq s2,
out CORBA::StringSeq s3);
+ CORBA::LongSeq test_long_sequence (in CORBA::LongSeq s1,
+ inout CORBA::LongSeq s2,
+ out CORBA::LongSeq s3);
+
+ CORBA::OctetSeq test_octet_sequence (in CORBA::OctetSeq s1,
+ inout CORBA::OctetSeq s2,
+ out CORBA::OctetSeq s3);
+
void shutdown ();
// Shutdown the server: this is useful to check for memory leaks,
// performance results and in general to verify that orderly
diff --git a/tests/Alt_Mapping/alt_mapping.mpc b/tests/Alt_Mapping/alt_mapping.mpc
index 48eecc37dee..af71b0d4226 100644
--- a/tests/Alt_Mapping/alt_mapping.mpc
+++ b/tests/Alt_Mapping/alt_mapping.mpc
@@ -50,6 +50,8 @@ project(*Client): taoexe, codeset {
helper.cpp
options.cpp
results.cpp
+ ub_octet_seq.cpp
+ ub_long_seq.cpp
ub_string.cpp
ub_struct_seq.cpp
ub_str_seq.cpp
@@ -60,6 +62,9 @@ project(*Client): taoexe, codeset {
helper.h
options.h
results.h
+ tests.h
+ ub_octet_seq.h
+ ub_long_seq.h
ub_string.h
ub_struct_seq.h
ub_str_seq.h
diff --git a/tests/Alt_Mapping/alt_mapping_i.cpp b/tests/Alt_Mapping/alt_mapping_i.cpp
index 48d1134f89f..99e2f12bc12 100644
--- a/tests/Alt_Mapping/alt_mapping_i.cpp
+++ b/tests/Alt_Mapping/alt_mapping_i.cpp
@@ -54,15 +54,39 @@ Alt_Mapping_i::test_struct_sequence (
CORBA::StringSeq
Alt_Mapping_i::test_strseq (
- const CORBA::StringSeq & s1,
- CORBA::StringSeq & s2,
- CORBA::StringSeq & s3)
+ const CORBA::StringSeq & s1,
+ CORBA::StringSeq & s2,
+ CORBA::StringSeq & s3)
{
s2 = s1;
s3 = s1;
return s1;
}
+CORBA::LongSeq
+Alt_Mapping_i::test_long_sequence (const CORBA::LongSeq & s1,
+ CORBA::LongSeq & s2,
+ CORBA::LongSeq & s3)
+{
+ s2 = s1;
+ s3 = s1;
+ CORBA::LongSeq ret (s1);
+
+ return ret;
+}
+
+CORBA::OctetSeq
+Alt_Mapping_i::test_octet_sequence (const CORBA::OctetSeq & s1,
+ CORBA::OctetSeq & s2,
+ CORBA::OctetSeq & s3)
+{
+ s2 = s1;
+ s3 = s1;
+ CORBA::OctetSeq ret (s1);
+
+ return ret;
+}
+
void
Alt_Mapping_i::shutdown (void)
{
diff --git a/tests/Alt_Mapping/alt_mapping_i.h b/tests/Alt_Mapping/alt_mapping_i.h
index a1eb16f045b..0014074f1fa 100644
--- a/tests/Alt_Mapping/alt_mapping_i.h
+++ b/tests/Alt_Mapping/alt_mapping_i.h
@@ -40,7 +40,17 @@ public:
const CORBA::StringSeq & s1,
CORBA::StringSeq & s2,
CORBA::StringSeq & s3);
-
+
+ virtual CORBA::LongSeq test_long_sequence (
+ const CORBA::LongSeq & s1,
+ CORBA::LongSeq & s2,
+ CORBA::LongSeq & s3);
+
+ virtual CORBA::OctetSeq test_octet_sequence (
+ const CORBA::OctetSeq & s1,
+ CORBA::OctetSeq & s2,
+ CORBA::OctetSeq & s3);
+
void shutdown (void);
private:
diff --git a/tests/Alt_Mapping/driver.cpp b/tests/Alt_Mapping/driver.cpp
index 9d9f70bb5a1..6a8c6abee1d 100644
--- a/tests/Alt_Mapping/driver.cpp
+++ b/tests/Alt_Mapping/driver.cpp
@@ -122,7 +122,7 @@ Driver::run (void)
new
Alt_Mapping_Client<Test_Unbounded_String> (
this->orb_.in (),
- this->objref_.in(),
+ this->objref_.in (),
new Test_Unbounded_String);
retstatus = client->run_sii_test ();
@@ -136,7 +136,7 @@ Driver::run (void)
new
Alt_Mapping_Client<Test_Unbounded_Struct_Sequence> (
this->orb_.in (),
- this->objref_.in(),
+ this->objref_.in (),
new Test_Unbounded_Struct_Sequence);
retstatus = client->run_sii_test ();
@@ -150,7 +150,7 @@ Driver::run (void)
new
Alt_Mapping_Client<Test_String_Sequence> (
this->orb_.in (),
- this->objref_.in(),
+ this->objref_.in (),
new Test_String_Sequence);
retstatus = client->run_sii_test ();
@@ -158,6 +158,34 @@ Driver::run (void)
delete client;
}
break;
+ case Options::TEST_UB_LONG_SEQUENCE:
+ {
+ Alt_Mapping_Client<Test_Long_Sequence> *client =
+ new
+ Alt_Mapping_Client<Test_Long_Sequence> (
+ this->orb_.in (),
+ this->objref_.in (),
+ new Test_Long_Sequence);
+
+ retstatus = client->run_sii_test ();
+
+ delete client;
+ }
+ break;
+ case Options::TEST_UB_OCTET_SEQUENCE:
+ {
+ Alt_Mapping_Client<Test_Octet_Sequence> *client =
+ new
+ Alt_Mapping_Client<Test_Octet_Sequence> (
+ this->orb_.in (),
+ this->objref_.in (),
+ new Test_Octet_Sequence);
+
+ retstatus = client->run_sii_test ();
+
+ delete client;
+ }
+ break;
default:
break;
}
diff --git a/tests/Alt_Mapping/helper.cpp b/tests/Alt_Mapping/helper.cpp
index 26f38b4ce3a..b6484a8e860 100644
--- a/tests/Alt_Mapping/helper.cpp
+++ b/tests/Alt_Mapping/helper.cpp
@@ -27,6 +27,12 @@ Generator::~Generator (void)
{
}
+CORBA::Octet
+Generator::gen_octet (void)
+{
+ return (CORBA::Octet) (ACE_OS::rand () % TEST_BUFSIZE);
+}
+
CORBA::Short
Generator::gen_short (void)
{
diff --git a/tests/Alt_Mapping/helper.h b/tests/Alt_Mapping/helper.h
index 3165a376941..8ef8cc3bf99 100644
--- a/tests/Alt_Mapping/helper.h
+++ b/tests/Alt_Mapping/helper.h
@@ -30,6 +30,7 @@ public:
~Generator (void);
+ CORBA::Octet gen_octet (void);
CORBA::Short gen_short (void);
CORBA::Long gen_long (void);
char* gen_string (void);
diff --git a/tests/Alt_Mapping/options.cpp b/tests/Alt_Mapping/options.cpp
index 979db1b8e34..0828f65e4f3 100644
--- a/tests/Alt_Mapping/options.cpp
+++ b/tests/Alt_Mapping/options.cpp
@@ -95,6 +95,10 @@ Options::parse_args (int argc, ACE_TCHAR **argv)
this->test_type_ = Options::TEST_UB_STRUCT_SEQUENCE;
else if (!ACE_OS::strcmp (get_opts.opt_arg (), ACE_TEXT("ub_strseq")))
this->test_type_ = Options::TEST_UB_STRING_SEQUENCE;
+ else if (!ACE_OS::strcmp (get_opts.opt_arg (), ACE_TEXT("ub_long_seq")))
+ this->test_type_ = Options::TEST_UB_LONG_SEQUENCE;
+ else if (!ACE_OS::strcmp (get_opts.opt_arg (), ACE_TEXT("ub_octet_seq")))
+ this->test_type_ = Options::TEST_UB_OCTET_SEQUENCE;
break;
case '?':
diff --git a/tests/Alt_Mapping/options.h b/tests/Alt_Mapping/options.h
index d6f61d1511d..45151630cba 100644
--- a/tests/Alt_Mapping/options.h
+++ b/tests/Alt_Mapping/options.h
@@ -38,7 +38,9 @@ public:
NO_TEST,
TEST_UB_STRING,
TEST_UB_STRUCT_SEQUENCE,
- TEST_UB_STRING_SEQUENCE
+ TEST_UB_STRING_SEQUENCE,
+ TEST_UB_LONG_SEQUENCE,
+ TEST_UB_OCTET_SEQUENCE
};
enum INVOKE_TYPE
diff --git a/tests/Alt_Mapping/run_test.pl b/tests/Alt_Mapping/run_test.pl
index 8b13d25c2ef..0271f212d35 100755
--- a/tests/Alt_Mapping/run_test.pl
+++ b/tests/Alt_Mapping/run_test.pl
@@ -24,7 +24,7 @@ $status = 0;
# Parse the arguments
-@types = ("ubstring", "ub_struct_seq", "ub_strseq");
+@types = ("ubstring", "ub_struct_seq", "ub_strseq", "ub_long_seq", "ub_octet_seq");
for ($i = 0; $i <= $#ARGV; $i++) {
diff --git a/tests/Alt_Mapping/tests.h b/tests/Alt_Mapping/tests.h
index 3f2f8e3e3fb..c1635ad5e1e 100644
--- a/tests/Alt_Mapping/tests.h
+++ b/tests/Alt_Mapping/tests.h
@@ -19,5 +19,7 @@
#include "ub_struct_seq.h"
#include "ub_string.h"
#include "ub_str_seq.h"
+#include "ub_long_seq.h"
+#include "ub_octet_seq.h"
#endif /* if !defined */
diff --git a/tests/Alt_Mapping/ub_long_seq.cpp b/tests/Alt_Mapping/ub_long_seq.cpp
new file mode 100644
index 00000000000..f9f1dd73384
--- /dev/null
+++ b/tests/Alt_Mapping/ub_long_seq.cpp
@@ -0,0 +1,187 @@
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// TAO/tests/Param_Test
+//
+// = FILENAME
+// ub_long_seq.cpp
+//
+// = DESCRIPTION
+// tests unbounded long sequences
+//
+// = AUTHORS
+// Aniruddha Gokhale
+// Jeff Parsons
+//
+// ============================================================================
+
+#include "helper.h"
+#include "ub_long_seq.h"
+
+// ************************************************************************
+// Test_Long_Sequence
+// ************************************************************************
+
+Test_Long_Sequence::Test_Long_Sequence (void)
+ : opname_ ("test_long_sequence")
+{
+}
+
+Test_Long_Sequence::~Test_Long_Sequence (void)
+{
+}
+
+const char *
+Test_Long_Sequence::opname (void) const
+{
+ return this->opname_.c_str ();
+}
+
+int
+Test_Long_Sequence::init_parameters (Alt_Mapping_ptr)
+{
+ Generator *gen = GENERATOR::instance (); // value generator
+
+ // Get some sequence length (not more than 10).
+ CORBA::ULong len = (CORBA::ULong) (gen->gen_long () % 10) + 1;
+
+ // Set the length of the sequence.
+ this->in_.resize (len);
+ this->inout_.resize (len);
+
+ // Now set each individual elements.
+ for (CORBA::ULong i = 0; i < this->in_.size (); i++)
+ {
+ this->in_[i] = i;
+ this->inout_[i] = i + 1;
+ }
+
+ return 0;
+}
+
+int
+Test_Long_Sequence::reset_parameters (void)
+{
+ this->inout_.clear ();
+ this->out_.clear ();
+ this->ret_.clear ();
+
+ return 0;
+}
+
+int
+Test_Long_Sequence::run_sii_test (Alt_Mapping_ptr objref)
+{
+ try
+ {
+ this->ret_ = objref->test_long_sequence (this->in_,
+ this->inout_,
+ this->out_);
+
+ return 0;
+ }
+ catch (const CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("Test_Long_Sequence::run_sii_test\n");
+
+ }
+ return -1;
+}
+
+CORBA::Boolean
+Test_Long_Sequence::check_validity (void)
+{
+ CORBA::Boolean flag = false;
+
+ if (this->in_.size () == this->inout_.size () &&
+ this->in_.size () == this->out_.size () &&
+ this->in_.size () == this->ret_.size ())
+ {
+ flag = true; // assume all are equal
+
+ // lengths are same. Now compare the contents
+ for (CORBA::ULong i = 0; i < this->in_.size () && flag; i++)
+ {
+ if (this->in_[i] != this->inout_[i] ||
+ this->in_[i] != this->out_[i] ||
+ this->in_[i] != this->ret_[i])
+ // not equal
+ flag = false;
+ }
+ }
+
+ return flag;
+}
+
+void
+Test_Long_Sequence::print_values (void)
+{
+ CORBA::ULong i;
+ ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
+
+ for (i = 0; i < this->in_.size (); i++)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Element #%d\n"
+ "in : %d\n",
+ i,
+ this->in_[i]));
+ }
+
+ if (this->in_.empty ())
+ {
+ ACE_DEBUG ((LM_DEBUG, "\nin sequence is empty\n"));
+ }
+
+ ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
+
+ for (i = 0; i < this->inout_.size (); i++)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Element #%d\n"
+ "in : %d\n",
+ i,
+ this->inout_[i]));
+ }
+
+ if (this->inout_.empty ())
+ {
+ ACE_DEBUG ((LM_DEBUG, "\ninout sequence is empty\n"));
+ }
+
+ ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
+
+ for (i = 0; i < this->out_.size (); i++)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Element #%d\n"
+ "in : %d\n",
+ i,
+ this->out_[i]));
+ }
+
+ if (this->out_.empty ())
+ {
+ ACE_DEBUG ((LM_DEBUG, "\nout sequence is empty\n"));
+ }
+
+ ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
+
+ for (i = 0; i < this->ret_.size (); i++)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Element #%d\n"
+ "in : %d\n",
+ i,
+ this->ret_[i]));
+ }
+
+ if (this->ret_.empty ())
+ {
+ ACE_DEBUG ((LM_DEBUG, "\nin sequence is empty\n"));
+ }
+
+ ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
+}
diff --git a/tests/Alt_Mapping/ub_long_seq.h b/tests/Alt_Mapping/ub_long_seq.h
new file mode 100644
index 00000000000..6c9d9601b14
--- /dev/null
+++ b/tests/Alt_Mapping/ub_long_seq.h
@@ -0,0 +1,73 @@
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// TAO/tests/Param_Test
+//
+// = FILENAME
+// ub_long_seq.h
+//
+// = DESCRIPTION
+// Tests unbounded long sequences
+//
+// = AUTHORS
+// Aniruddha Gokhale
+// Jeff Parsons
+//
+// ============================================================================
+
+#ifndef ALT_MAPPING_UNBOUNDED_LONG_SEQUENCE_H
+#define ALT_MAPPING_UNBOUNDED_LONG_SEQUENCE_H
+
+#include "alt_mappingC.h"
+
+// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
+// test sequences of longs
+// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
+
+class Test_Long_Sequence
+{
+public:
+ Test_Long_Sequence (void);
+ // ctor
+
+ ~Test_Long_Sequence (void);
+ // dtor
+
+ int run_sii_test (Alt_Mapping_ptr objref);
+ // run the SII test
+
+ const char *opname (void) const;
+ // return operation name
+
+ int init_parameters (Alt_Mapping_ptr objref);
+ // set values for parameters
+
+ int reset_parameters (void);
+ // reset values for CORBA
+
+ CORBA::Boolean check_validity (void);
+ // check if results are valid
+
+ void print_values (void);
+ // print all the values
+
+private:
+ std::string opname_;
+ // operation name
+
+ CORBA::LongSeq in_;
+ // in parameter
+
+ CORBA::LongSeq inout_;
+ // inout parameter
+
+ CORBA::LongSeq out_;
+ // out parameter
+
+ CORBA::LongSeq ret_;
+ // return value
+};
+
+#endif /* ALT_MAPPING_UNBOUNDED_LONG_SEQUENCE_H */
diff --git a/tests/Alt_Mapping/ub_octet_seq.cpp b/tests/Alt_Mapping/ub_octet_seq.cpp
new file mode 100644
index 00000000000..6a3fca08f65
--- /dev/null
+++ b/tests/Alt_Mapping/ub_octet_seq.cpp
@@ -0,0 +1,187 @@
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// TAO/tests/Param_Test
+//
+// = FILENAME
+// ub_octet_seq.cpp
+//
+// = DESCRIPTION
+// tests unbounded octet sequences
+//
+// = AUTHORS
+// Aniruddha Gokhale
+// Jeff Parsons
+//
+// ============================================================================
+
+#include "helper.h"
+#include "ub_octet_seq.h"
+
+// ************************************************************************
+// Test_Octet_Sequence
+// ************************************************************************
+
+Test_Octet_Sequence::Test_Octet_Sequence (void)
+ : opname_ ("test_octet_sequence")
+{
+}
+
+Test_Octet_Sequence::~Test_Octet_Sequence (void)
+{
+}
+
+const char *
+Test_Octet_Sequence::opname (void) const
+{
+ return this->opname_.c_str ();
+}
+
+int
+Test_Octet_Sequence::init_parameters (Alt_Mapping_ptr)
+{
+ Generator *gen = GENERATOR::instance (); // value generator
+
+ // Get some sequence length (not more than 10).
+ CORBA::ULong len = (CORBA::ULong) (gen->gen_long () % 10) + 1;
+
+ // Set the length of the sequence.
+ this->in_.resize (len);
+ this->inout_.resize (len);
+
+ // Now set each individual elements.
+ for (CORBA::ULong i = 0; i < this->in_.size (); i++)
+ {
+ this->in_[i] = (CORBA::Octet) i;
+ this->inout_[i] = (CORBA::Octet) (i + 1);
+ }
+
+ return 0;
+}
+
+int
+Test_Octet_Sequence::reset_parameters (void)
+{
+ this->inout_.clear ();
+ this->out_.clear ();
+ this->ret_.clear ();
+
+ return 0;
+}
+
+int
+Test_Octet_Sequence::run_sii_test (Alt_Mapping_ptr objref)
+{
+ try
+ {
+ this->ret_ = objref->test_octet_sequence (this->in_,
+ this->inout_,
+ this->out_);
+
+ return 0;
+ }
+ catch (const CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("Test_Long_Sequence::run_sii_test\n");
+
+ }
+ return -1;
+}
+
+CORBA::Boolean
+Test_Octet_Sequence::check_validity (void)
+{
+ CORBA::Boolean flag = false;
+
+ if (this->in_.size () == this->inout_.size () &&
+ this->in_.size () == this->out_.size () &&
+ this->in_.size () == this->ret_.size ())
+ {
+ flag = true; // assume all are equal
+
+ // lengths are same. Now compare the contents
+ for (CORBA::ULong i = 0; i < this->in_.size () && flag; i++)
+ {
+ if (this->in_[i] != this->inout_[i] ||
+ this->in_[i] != this->out_[i] ||
+ this->in_[i] != this->ret_[i])
+ // not equal
+ flag = false;
+ }
+ }
+
+ return flag;
+}
+
+void
+Test_Octet_Sequence::print_values (void)
+{
+ CORBA::ULong i;
+ ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
+
+ for (i = 0; i < this->in_.size (); i++)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Element #%d\n"
+ "in : %d\n",
+ i,
+ this->in_[i]));
+ }
+
+ if (this->in_.empty ())
+ {
+ ACE_DEBUG ((LM_DEBUG, "\nin sequence is empty\n"));
+ }
+
+ ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
+
+ for (i = 0; i < this->inout_.size (); i++)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Element #%d\n"
+ "in : %d\n",
+ i,
+ this->inout_[i]));
+ }
+
+ if (this->inout_.empty ())
+ {
+ ACE_DEBUG ((LM_DEBUG, "\ninout sequence is empty\n"));
+ }
+
+ ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
+
+ for (i = 0; i < this->out_.size (); i++)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Element #%d\n"
+ "in : %d\n",
+ i,
+ this->out_[i]));
+ }
+
+ if (this->out_.empty ())
+ {
+ ACE_DEBUG ((LM_DEBUG, "\nout sequence is empty\n"));
+ }
+
+ ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
+
+ for (i = 0; i < this->ret_.size (); i++)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Element #%d\n"
+ "in : %d\n",
+ i,
+ this->ret_[i]));
+ }
+
+ if (this->ret_.empty ())
+ {
+ ACE_DEBUG ((LM_DEBUG, "\nin sequence is empty\n"));
+ }
+
+ ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n"));
+}
diff --git a/tests/Alt_Mapping/ub_octet_seq.h b/tests/Alt_Mapping/ub_octet_seq.h
new file mode 100644
index 00000000000..eac7a49eaed
--- /dev/null
+++ b/tests/Alt_Mapping/ub_octet_seq.h
@@ -0,0 +1,73 @@
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// TAO/tests/Param_Test
+//
+// = FILENAME
+// ub_octet_seq.h
+//
+// = DESCRIPTION
+// Tests unbounded octet sequences
+//
+// = AUTHORS
+// Aniruddha Gokhale
+// Jeff Parsons
+//
+// ============================================================================
+
+#ifndef ALT_MAPPING_UNBOUNDED_OCTET_SEQUENCE_H
+#define ALT_MAPPING_UNBOUNDED_OCTET_SEQUENCE_H
+
+#include "alt_mappingC.h"
+
+// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
+// test sequences of octete
+// =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
+
+class Test_Octet_Sequence
+{
+public:
+ Test_Octet_Sequence (void);
+ // ctor
+
+ ~Test_Octet_Sequence (void);
+ // dtor
+
+ int run_sii_test (Alt_Mapping_ptr objref);
+ // run the SII test
+
+ const char *opname (void) const;
+ // return operation name
+
+ int init_parameters (Alt_Mapping_ptr objref);
+ // set values for parameters
+
+ int reset_parameters (void);
+ // reset values for CORBA
+
+ CORBA::Boolean check_validity (void);
+ // check if results are valid
+
+ void print_values (void);
+ // print all the values
+
+private:
+ std::string opname_;
+ // operation name
+
+ CORBA::OctetSeq in_;
+ // in parameter
+
+ CORBA::OctetSeq inout_;
+ // inout parameter
+
+ CORBA::OctetSeq out_;
+ // out parameter
+
+ CORBA::OctetSeq ret_;
+ // return value
+};
+
+#endif /* ALT_MAPPING_UNBOUNDED_OCTET_SEQUENCE_H */
diff --git a/tests/Alt_Mapping/ub_str_seq.h b/tests/Alt_Mapping/ub_str_seq.h
index 584664869b1..6cfd40eab24 100644
--- a/tests/Alt_Mapping/ub_str_seq.h
+++ b/tests/Alt_Mapping/ub_str_seq.h
@@ -13,11 +13,12 @@
//
// = AUTHORS
// Aniruddha Gokhale
+// Jeff Parsons
//
// ============================================================================
-#ifndef PARAM_TEST_UNBOUNDED_STRING_SEQUENCE_H
-#define PARAM_TEST_UNBOUNDED_STRING_SEQUENCE_H
+#ifndef ALT_MAPPING_TEST_UNBOUNDED_STRING_SEQUENCE_H
+#define ALT_MAPPING_TEST_UNBOUNDED_STRING_SEQUENCE_H
#include "alt_mappingC.h"
@@ -56,4 +57,4 @@ private:
CORBA::StringSeq ret_;
};
-#endif /* PARAM_TEST_UNBOUNDED_STRING_SEQUENCE_H */
+#endif /* ALT_MAPPING_TEST_UNBOUNDED_STRING_SEQUENCE_H */
diff --git a/tests/Alt_Mapping/ub_string.h b/tests/Alt_Mapping/ub_string.h
index 33155631c07..d61e2337155 100644
--- a/tests/Alt_Mapping/ub_string.h
+++ b/tests/Alt_Mapping/ub_string.h
@@ -13,11 +13,12 @@
//
// = AUTHORS
// Aniruddha Gokhale
+// Jeff Parsons
//
// ============================================================================
-#ifndef PARAM_TEST_UNBOUNDED_STRING_H
-#define PARAM_TEST_UNBOUNDED_STRING_H
+#ifndef ALT_MAPPING_TEST_UNBOUNDED_STRING_H
+#define ALT_MAPPING_TEST_UNBOUNDED_STRING_H
#include "alt_mappingC.h"
@@ -64,4 +65,4 @@ private:
std::string ret_;
};
-#endif /* PARAM_TEST_UNBOUNDED_STRING_H */
+#endif /* ALT_MAPPING_TEST_UNBOUNDED_STRING_H */
diff --git a/tests/Alt_Mapping/ub_struct_seq.h b/tests/Alt_Mapping/ub_struct_seq.h
index 04d3308af8b..a85f78c7d5b 100644
--- a/tests/Alt_Mapping/ub_struct_seq.h
+++ b/tests/Alt_Mapping/ub_struct_seq.h
@@ -13,6 +13,7 @@
//
// = AUTHORS
// Aniruddha Gokhale
+// Jeff Parsons
//
// ============================================================================