summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-09-23 00:42:46 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-09-23 00:42:46 +0000
commit519d35b8ffa9cea060f5c88c995d4188c969dd53 (patch)
treea6ac0d442395699e4f7c98169437e5e97a1e1735
parentb2ec06f183555051ffca4eff2ac17aa8866b7281 (diff)
downloadATCD-519d35b8ffa9cea060f5c88c995d4188c969dd53.tar.gz
Wed Sep 22 20:41:44 2004 Carlos O'Ryan <coryan@atdesk.com>
-rw-r--r--TAO/ChangeLog8
-rw-r--r--TAO/tests/Sequence_Unit_Tests/Bounded_Simple_Types.cpp38
-rw-r--r--TAO/tests/Sequence_Unit_Tests/Unbounded_Simple_Types.cpp37
3 files changed, 63 insertions, 20 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index d5d29df02f2..6c9e4ca641e 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,11 @@
+Wed Sep 22 20:41:44 2004 Carlos O'Ryan <coryan@atdesk.com>
+
+ * tests/Sequence_Unit_Tests/Bounded_Simple_Types.cpp:
+ * tests/Sequence_Unit_Tests/Unbounded_Simple_Types.cpp:
+ To avoid compilation warnings on Tru64_Compaq_C++ we do not use
+ explicit template intantiation, instead we just use all the
+ functions.
+
Wed Sep 22 20:25:12 2004 Carlos O'Ryan <coryan@atdesk.com>
* tests/Sequence_Unit_Tests/string_sequence_element.hpp:
diff --git a/TAO/tests/Sequence_Unit_Tests/Bounded_Simple_Types.cpp b/TAO/tests/Sequence_Unit_Tests/Bounded_Simple_Types.cpp
index e7ee0b86dc7..64192b701e8 100644
--- a/TAO/tests/Sequence_Unit_Tests/Bounded_Simple_Types.cpp
+++ b/TAO/tests/Sequence_Unit_Tests/Bounded_Simple_Types.cpp
@@ -25,20 +25,38 @@ int main(int,char*[])
int_sequence a;
int_sequence b(a);
+ int_sequence c(0, int_sequence::allocbuf());
+
a = b;
+ a.length(c.maximum());
+ if (a.release())
+ {
+ b.length(a.length());
+ }
+
+ a[0] = 0;
+ b[0] = a[0];
+
+ int_sequence const & d = a;
+ c[0] = d[0];
+
+ b.replace(0, int_sequence::allocbuf());
+
+ int const * x = d.get_buffer();
+ if (x != 0)
+ {
+ int_sequence::freebuf(a.get_buffer(true));
+ }
+ x = b.get_buffer();
+
+ int_sequence e(c);
+
typedef TAO::bounded_value_sequence<Foo,TEST_FOO_MAX> Foo_sequence;
- Foo_sequence c;
- Foo_sequence d(c);
- d = c;
+ Foo_sequence u;
+ Foo_sequence v(u);
+ u = v;
return 0;
}
-
-// We use explicit template instantiation to force the instantiation
-// of all member function and thus tests the full class. This should
-// work across all platforms, even on platforms that do not *require*
-// explicit instantiation of templates.
-template class TAO::bounded_value_sequence<int,TEST_INT_MAX>;
-template class TAO::bounded_value_sequence<Foo,TEST_FOO_MAX>;
diff --git a/TAO/tests/Sequence_Unit_Tests/Unbounded_Simple_Types.cpp b/TAO/tests/Sequence_Unit_Tests/Unbounded_Simple_Types.cpp
index f2123601fa0..9d2180cd0ed 100644
--- a/TAO/tests/Sequence_Unit_Tests/Unbounded_Simple_Types.cpp
+++ b/TAO/tests/Sequence_Unit_Tests/Unbounded_Simple_Types.cpp
@@ -22,20 +22,37 @@ int main(int,char*[])
int_sequence a;
int_sequence b(23);
+ int_sequence c(32, 0, int_sequence::allocbuf(32));
+
a = b;
+ a.length(c.maximum());
+ if (a.release())
+ {
+ b.length(a.length());
+ }
+ a[0] = 0;
+ b[0] = a[0];
+
+ int_sequence const & d = a;
+ c[0] = d[0];
+
+ b.replace(64, 0, int_sequence::allocbuf(64));
+
+ int const * x = d.get_buffer();
+ if (x != 0)
+ {
+ int_sequence::freebuf(a.get_buffer(true));
+ }
+ x = b.get_buffer();
+
+ int_sequence e(c);
+
typedef TAO::unbounded_value_sequence<Foo> Foo_sequence;
- Foo_sequence c;
- Foo_sequence d(32);
- d = c;
+ Foo_sequence u;
+ Foo_sequence v(32);
+ u = v;
return 0;
}
-
-// We use explicit template instantiation to force the instantiation
-// of all member function and thus tests the full class. This should
-// work across all platforms, even on platforms that do not *require*
-// explicit instantiation of templates.
-template class TAO::unbounded_value_sequence<int>;
-template class TAO::unbounded_value_sequence<Foo>;