4 * @brief Smoke test (basically just compile) the unbounded sequences
7 * @author Johnny Willemsen <jwillemsen@remedy.nl>
9 #include "tao/Basic_Types.h"
10 #include "tao/Unbounded_Octet_Sequence_T.h"
11 #include "ace/Log_Msg.h"
13 typedef TAO::unbounded_value_sequence
<CORBA::Octet
> 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());
34 s_sequence
const & d
= a
;
38 #if defined (TAO_CHECKED_SEQUENCE_INDEXING) && (TAO_CHECKED_SEQUENCE_INDEXING == 1)
42 catch (const ::CORBA::BAD_PARAM
&)
44 // c has length = 0, so there is an exception when we try
45 // to access element above length.
48 b
.replace(64, 0, s_sequence::allocbuf(64), true);
50 CORBA::Octet
const * x
= d
.get_buffer();
53 s_sequence::freebuf(a
.get_buffer(true));
59 s_sequence::freebuf(s_sequence::allocbuf(64));
64 catch (const ::CORBA::Exception
&)
66 ACE_ERROR ((LM_ERROR
, "Caught unexpected exception\n"));