Merge pull request #2303 from jwillemsen/jwi-803
[ACE_TAO.git] / TAO / tests / Sequence_Unit_Tests / unbounded_array_sequence_ut.cpp
blob42dcf0a722d0cba83a35c7ce291122cc6d9aedde
1 /**
2 * @file
4 * @brief Unit test for unbounded sequences of arrays.
6 * @author Carlos O'Ryan
7 */
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) \
16 if (CONDITION) \
17 { \
18 ACE_DEBUG ((LM_ERROR, ACE_TEXT ("\tFailed at %N:%l\n"))); \
19 return 1; \
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()
33 tested_sequence x;
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*[])
43 int status = 0;
45 status += test_default_constructor ();
47 return status;