4 * @brief Unit test for unbounded sequences of arrays.
6 * @author Carlos O'Ryan
9 #include "mock_array.hpp"
10 #include "testing_allocation_traits.hpp"
11 #include "testing_range_checking.hpp"
13 #include "tao/Unbounded_Array_Sequence_T.h"
15 #define FAIL_RETURN_IF(CONDITION) \
18 ACE_DEBUG ((LM_ERROR, ACE_TEXT ("\tFailed at %N:%l\n"))); \
22 typedef unbounded_array_sequence
<my_array
, my_array_slice
, my_array_tag
> tested_sequence
;
23 typedef tested_sequence::value_type value_type
;
24 typedef tested_sequence::const_value_type const_value_type
;
26 typedef tested_sequence::element_traits tested_element_traits
;
27 typedef tested_sequence::allocation_traits tested_allocation_traits
;
28 typedef TAO::details::range_checking
<value_type
,true> range
;
30 int test_default_constructor()
35 FAIL_RETURN_IF(CORBA::ULong(0), x
.maximum());
36 FAIL_RETURN_IF(CORBA::ULong(0), x
.length());
37 FAIL_RETURN_IF(true, x
.release());
41 int ACE_TMAIN(int,ACE_TCHAR
*[])
45 status
+= test_default_constructor ();