From 519d35b8ffa9cea060f5c88c995d4188c969dd53 Mon Sep 17 00:00:00 2001 From: coryan Date: Thu, 23 Sep 2004 00:42:46 +0000 Subject: Wed Sep 22 20:41:44 2004 Carlos O'Ryan --- TAO/ChangeLog | 8 +++++ .../Sequence_Unit_Tests/Bounded_Simple_Types.cpp | 38 ++++++++++++++++------ .../Sequence_Unit_Tests/Unbounded_Simple_Types.cpp | 37 +++++++++++++++------ 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 + + * 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 * 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_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; -template class TAO::bounded_value_sequence; 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_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; -template class TAO::unbounded_value_sequence; -- cgit v1.2.1