4 * @brief Smoke test (basically just compile) the unbounded sequences
7 * @author Carlos O'Ryan
9 #include "tao/Unbounded_Basic_String_Sequence_T.h"
10 #include "tao/CORBA_String.h"
11 #include "ace/Log_Msg.h"
13 typedef TAO::unbounded_basic_string_sequence
<char> s_sequence
;
15 int ACE_TMAIN (int, ACE_TCHAR
*[])
22 s_sequence
c(32, 0, s_sequence::allocbuf(32), true);
25 a
.length(c
.maximum());
30 a
[0] = const_cast<char const*>("Hello");
33 s_sequence
const & d
= a
;
37 #if defined (TAO_CHECKED_SEQUENCE_INDEXING) && (TAO_CHECKED_SEQUENCE_INDEXING == 1)
41 catch (const ::CORBA::BAD_PARAM
&)
43 // c has length = 0, so there is an exception when we try
44 // to access element above length.
47 b
.replace(64, 0, s_sequence::allocbuf(64), true);
49 char const * const * x
= d
.get_buffer();
52 s_sequence::freebuf(a
.get_buffer(true));
58 s_sequence::freebuf(s_sequence::allocbuf(64));
63 CORBA::String_var
w(const_cast<char const*>("World"));
67 #if defined (TAO_CHECKED_SEQUENCE_INDEXING) && (TAO_CHECKED_SEQUENCE_INDEXING == 1)
71 catch (const ::CORBA::BAD_PARAM
&)
73 // e has length = 0, so there is an exception when we try
74 // to access element above length.
77 catch (const ::CORBA::Exception
&)
79 ACE_ERROR ((LM_ERROR
, "Caught unexpected exception\n"));