diff options
Diffstat (limited to 'TAO/tests/DynAny_Test/test_wrapper.cpp')
-rw-r--r-- | TAO/tests/DynAny_Test/test_wrapper.cpp | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/TAO/tests/DynAny_Test/test_wrapper.cpp b/TAO/tests/DynAny_Test/test_wrapper.cpp new file mode 100644 index 00000000000..a4192374341 --- /dev/null +++ b/TAO/tests/DynAny_Test/test_wrapper.cpp @@ -0,0 +1,59 @@ +//============================================================================= +/** + * @file test_wrapper.cpp + * + * $Id$ + * + * This file contains the implementation of the DynAny basic test manager + * + * + * @author Jeff Parsons <parsons@cs.wustl.edu> + */ +//============================================================================= + + +#if !defined (TEST_WRAPPER_CPP) +#define TEST_WRAPPER_CPP + +#include "test_wrapper.h" +#include "ace/OS.h" +#include "ace/Log_Msg.h" + +// Constructor +template <class T> +Test_Wrapper<T>::Test_Wrapper (T* t) + : test_object_ (t) +{ +} + +// Destructor +template <class T> +Test_Wrapper<T>::~Test_Wrapper (void) +{ + delete this->test_object_; +} + +template <class T> +int +Test_Wrapper<T>::run_test (void) +{ + const char* test_name = this->test_object_->test_name (); + + ACE_DEBUG ((LM_DEBUG, + "********************* %s *******************\n\n", + test_name)); + + if (this->test_object_->run_test () == -1) + { + ACE_ERROR ((LM_ERROR, + "(%N:%l) test_wrapper.cpp - run_test:" + "run_test exception in %s", + test_name)); + + return -1; + } + + return 0; +} + +#endif /* TEST_WRAPPER_CPP */ |