diff options
Diffstat (limited to 'tests/Sequence_Unit_Tests/value_sequence_tester.hpp')
-rw-r--r-- | tests/Sequence_Unit_Tests/value_sequence_tester.hpp | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/tests/Sequence_Unit_Tests/value_sequence_tester.hpp b/tests/Sequence_Unit_Tests/value_sequence_tester.hpp index f07b05c0d9e..d14d90c36c5 100644 --- a/tests/Sequence_Unit_Tests/value_sequence_tester.hpp +++ b/tests/Sequence_Unit_Tests/value_sequence_tester.hpp @@ -12,6 +12,7 @@ #include "tao/Basic_Types.h" #include "test_macros.h" +#include "tao/SystemException.h" TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -68,14 +69,22 @@ struct value_sequence_tester int test_index_accessor() { - tested_sequence x; - x.length(8); - // Set x[4] to any value just for suppressing valgrind complains. - x[4] = 1; - - tested_sequence const & y = x; - const_value_type & z = y[4]; - CHECK_EQUAL(z, y[4]); + try + { + tested_sequence x; + x.length(8); + // Set x[4] to any value just for suppressing valgrind complains. + x[4] = 1; + + tested_sequence const & y = x; + const_value_type & z = y[4]; + CHECK_EQUAL(z, y[4]); + } + catch (const ::CORBA::BAD_PARAM &) + { + ACE_ERROR ((LM_ERROR, "Error: test_index_accessor: BAD_PARAM exception caught\n")); + return 1; + } return 0; } |