diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-01-06 22:36:55 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-01-06 22:36:55 +0000 |
commit | 7f2f1bff2b6f40cc646074646bbb82c59aaf0d26 (patch) | |
tree | 47964c3b209979baa5fa078566d738c9a5a55b98 /TAO/tests/DynAny_Test | |
parent | 2cfbfd8012d736491d9b559c9d9cd49f02e08ec6 (diff) | |
download | ATCD-7f2f1bff2b6f40cc646074646bbb82c59aaf0d26.tar.gz |
This commit was manufactured by cvs2svn to create tag 'ACE-4_6_11'.ACE-4_6_11
Diffstat (limited to 'TAO/tests/DynAny_Test')
24 files changed, 0 insertions, 2292 deletions
diff --git a/TAO/tests/DynAny_Test/DynAny_Test.dsw b/TAO/tests/DynAny_Test/DynAny_Test.dsw deleted file mode 100644 index 449cc559046..00000000000 --- a/TAO/tests/DynAny_Test/DynAny_Test.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "basic_test"=.\basic_test\basic_test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/TAO/tests/DynAny_Test/Makefile b/TAO/tests/DynAny_Test/Makefile deleted file mode 100644 index 736ce5e34c5..00000000000 --- a/TAO/tests/DynAny_Test/Makefile +++ /dev/null @@ -1,67 +0,0 @@ -#------------------------------------------------------------ -# $Id$ -# -# Makefile for DynAny_Test examples -#------------------------------------------------------------ - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -ifndef TAO_ROOT - TAO_ROOT = $(ACE_ROOT)/TAO -endif # ! TAO_ROOT - -LDLIBS += -lTAO -LDFLAGS += -L$(ACE_ROOT)/bin - -IDL_SRC = da_testsC.cpp da_testsS.cpp - -BASIC_TEST_FILES = da_testsC \ - da_testsS \ - data \ - driver \ - test_dynany \ - test_dynarray \ - test_dynenum \ - test_dynsequence \ - test_dynstruct \ - test_dynunion \ - test_wrapper - -BASIC_TEST_OBJS = $(addsuffix .o, $(BASIC_TEST_FILES)) -SRC = $(addsuffix .cpp, $(BASIC_TEST_FILES)) - -BIN = basic_test -BUILD = $(BIN) -VLDLIBS = $(LDLIBS:%=%$(VAR)) -VBIN = $(BIN:%=%$(VAR)) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU - -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(TAO_ROOT)/rules.tao.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -#include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU - -TSS_ORB_FLAG = #-DTAO_HAS_TSS_ORBCORE -CPPFLAGS += -I$(TAO_ROOT) - -.PRECIOUS: da_testsC.h da_testsC.cpp da_testsS.h da_testsS.cpp \ - da_testsC.i da_testsS.i - -basic_test: $(addprefix $(VDIR),$(BASIC_TEST_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -clean: -/bin/rm -rf $(VDIR)/*.o $(BIN) obj.* core Templates.DB .make.state - -realclean: clean - -/bin/rm -rf da_testsC.* da_testsS.* da_testsS_T.* - - diff --git a/TAO/tests/DynAny_Test/README b/TAO/tests/DynAny_Test/README deleted file mode 100644 index ede5c03a538..00000000000 --- a/TAO/tests/DynAny_Test/README +++ /dev/null @@ -1,31 +0,0 @@ - - *********** DynAny_Test **************** - - updated 9/29/98. -// $Id$ - -// =================================================================== -// -// = LIBRARY -// TAO/tests/DynAny_Test -// -// = FILENAME -// README -// -// = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> -// -// =================================================================== - -This is a semi-complete run-through of DynAny functionality. -To run a test, type - -basic_test -t <dynany|dynarray|dynenum|dynsequence|dynstruct|dynunion> - -To save on output, several things are tested in one pass. For each -pass, a message is displayed, for example: - -"testing: constructor from any/insert/get" or -"testing: constructor from typecode/from_any/to_any" - -and finally an error count for the entire test. diff --git a/TAO/tests/DynAny_Test/basic_test.dsp b/TAO/tests/DynAny_Test/basic_test.dsp deleted file mode 100644 index 3b2fd3c9863..00000000000 --- a/TAO/tests/DynAny_Test/basic_test.dsp +++ /dev/null @@ -1,269 +0,0 @@ -# Microsoft Developer Studio Project File - Name="basic_test" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=basic_test - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "basic_test.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "basic_test.mak" CFG="basic_test - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "basic_test - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "basic_test - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "basic_test - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\\" /I "..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ace.lib TAO.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\ace" /libpath:"..\..\tao"
-
-!ELSEIF "$(CFG)" == "basic_test - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\\" /I "..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 aced.lib TAOd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\ace" /libpath:"..\..\tao"
-
-!ENDIF
-
-# Begin Target
-
-# Name "basic_test - Win32 Release"
-# Name "basic_test - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter ".cpp"
-# Begin Source File
-
-SOURCE=.\da_testsC.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\da_testsS.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\data.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\driver.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\test_dynany.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\test_dynarray.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\test_dynenum.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\test_dynsequence.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\test_dynstruct.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\test_dynunion.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\test_wrapper.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter ".h"
-# Begin Source File
-
-SOURCE=.\da_testsC.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\da_testsS.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\data.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\driver.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\test_dynany.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\test_dynarray.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\test_dynenum.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\test_dynsequence.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\test_dynstruct.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\test_dynunion.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\test_wrapper.h
-# End Source File
-# End Group
-# Begin Group "IDL Files"
-
-# PROP Default_Filter ".idl"
-# Begin Source File
-
-SOURCE=.\da_tests.idl
-
-!IF "$(CFG)" == "basic_test - Win32 Release"
-
-USERDEP__DA_TE="..\..\..\bin\tao_idl.exe"
-# Begin Custom Build - Invoking TAO IDL compiler
-InputPath=.\da_tests.idl
-InputName=da_tests
-
-BuildCmds= \
- ..\..\..\bin\tao_idl $(InputName).idl
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "basic_test - Win32 Debug"
-
-USERDEP__DA_TE="..\..\..\bin\tao_idl.exe"
-# Begin Custom Build - Invoking TAO IDL compiler
-InputPath=.\da_tests.idl
-InputName=da_tests
-
-BuildCmds= \
- ..\..\..\bin\tao_idl $(InputName).idl
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/TAO/tests/DynAny_Test/da_tests.idl b/TAO/tests/DynAny_Test/da_tests.idl deleted file mode 100644 index 40f188e172f..00000000000 --- a/TAO/tests/DynAny_Test/da_tests.idl +++ /dev/null @@ -1,42 +0,0 @@ -/* -*- C++ -*- */ -// -// $Id$ -// - -module DynAnyTests -{ - struct enclosed_struct { - float f; - short s; - }; - - struct test_struct { - char c; - long long ll; - enclosed_struct es; - }; - - typedef sequence<string> test_seq; - - const unsigned long DIM = 2; - typedef long test_array [DIM]; - - enum test_enum { - ZEROTH, - FIRST, - SECOND, - THIRD - }; - - union test_union switch (test_enum) - { - case SECOND: - TypeCode tc; - case FIRST: - short s; - case THIRD: - string str; - case ZEROTH: - octet o; - }; -}; diff --git a/TAO/tests/DynAny_Test/data.cpp b/TAO/tests/DynAny_Test/data.cpp deleted file mode 100644 index 2f923cedd9b..00000000000 --- a/TAO/tests/DynAny_Test/data.cpp +++ /dev/null @@ -1,108 +0,0 @@ -// -*- c++ -*- -// $Id$ -// ============================================================================ -// -// = LIBRARY -// TAO/tests/DynAny_Test -// -// = FILENAME -// data.cpp -// -// = DESCRIPTION -// Implementation file for the class containing test constants. -// -// = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> -// -// ============================================================================ - -#include "data.h" - -Data::Data (CORBA::ORB_var orb) - : m_bool1 (1), m_bool2 (0), - m_octet1 (8), m_octet2 (0), - m_char1 ('z'), m_char2 (0), - m_short1 (-5), m_short2 (0), - m_long1 (-123456), m_long2 (0), - m_ushort1 (5), m_ushort2 (0), - m_ulong1 (123456), m_ulong2 (0), - m_float1 (0.142857f), m_float2 (0.0f), - m_double1 (3.14159), m_double2 (0.0), - m_longlong1 (-654321), m_longlong2 (0), - m_ulonglong1 (654321), m_ulonglong2 (0), - m_string1 (CORBA::string_dup ("upchuck")), m_string2 (0), - - m_typecode1 (CORBA::TypeCode::_duplicate (CORBA::_tc_long)), - m_typecode2 (CORBA::TypeCode::_duplicate (CORBA::_tc_null)), - - m_wchar1 (666), m_wchar2 (0), - m_any1 (CORBA::_tc_long), - orb_ (orb) -{ - CORBA::Environment env; - - labels[0] = "type boolean"; - labels[1] = "type octet"; - labels[2] = "type char"; - labels[3] = "type short"; - labels[4] = "type long", - labels[5] = "type ushort"; - labels[6] = "type ulong"; - labels[7] = "type float"; - labels[8] = "type double"; - labels[9] = "type longlong"; - labels[10] = "type ulonglong"; - labels[11] = "type string"; - labels[12] = "type typecode"; - labels[13] = "type wchar"; - labels[14] = "type any"; - labels[15] = "type objref"; - - // Getting the RootPOA so we can generate object references. - CORBA::Object_var obj = - this->orb_->resolve_initial_references ("RootPOA"); - - if (CORBA::is_nil (obj.in ())) - ACE_ERROR ((LM_ERROR, - "(%P|%t) Unable to get root poa reference.\n")); - - // Get the POA_var object from Object_var. - PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (obj.in (), - env); - - if (env.exception () != 0) - env.print_exception ("PortableServer::POA::_narrow"); - - // Generate values for the member variables. - this->m_objref1 = - root_poa->create_reference ("foo", - env); - - if (env.exception () != 0) - env.print_exception ("PortableServer::POA::create_reference_with_id"); - - this->m_objref2 = - root_poa->create_reference ("foo", - env); - - if (env.exception () != 0) - env.print_exception ("PortableServer::POA::create_reference_with_id"); - - // Clean up after the POA - root_poa->destroy (1, - 1, - env); - - if (env.exception () != 0) - env.print_exception ("PortableServer::POA::destroy"); -} - -Data::~Data (void) -{ - CORBA::string_free (m_string1); - CORBA::string_free (m_string2); - CORBA::release (m_typecode1); - CORBA::release (m_typecode2); -} - diff --git a/TAO/tests/DynAny_Test/data.h b/TAO/tests/DynAny_Test/data.h deleted file mode 100644 index b58e4a45ce3..00000000000 --- a/TAO/tests/DynAny_Test/data.h +++ /dev/null @@ -1,48 +0,0 @@ -// -*- c++ -*- -// $Id$ -// ============================================================================ -// -// = LIBRARY -// TAO/tests/DynAny_Test -// -// = FILENAME -// data.h -// -// = DESCRIPTION -// Header file for the class containing test constants. -// -// = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> -// -// ============================================================================ - -#include "tao/corba.h" - -class Data -{ -public: - Data (CORBA::ORB_var orb); - ~Data (void); - - CORBA::Boolean m_bool1, m_bool2; - CORBA::Octet m_octet1, m_octet2; - CORBA::Char m_char1, m_char2; - CORBA::Short m_short1, m_short2; - CORBA::Long m_long1, m_long2; - CORBA::UShort m_ushort1, m_ushort2; - CORBA::ULong m_ulong1, m_ulong2; - CORBA::Float m_float1, m_float2; - CORBA::Double m_double1, m_double2; - CORBA::LongLong m_longlong1, m_longlong2; - CORBA::ULongLong m_ulonglong1, m_ulonglong2; - CORBA::String m_string1, m_string2; - CORBA::TypeCode_ptr m_typecode1, m_typecode2; - CORBA::WChar m_wchar1, m_wchar2; - CORBA::Any m_any1, m_any2; - CORBA::Object_var m_objref1, m_objref2; - -char* labels[16]; - -private: - CORBA::ORB_var orb_; -}; diff --git a/TAO/tests/DynAny_Test/driver.cpp b/TAO/tests/DynAny_Test/driver.cpp deleted file mode 100644 index d0e4ff29331..00000000000 --- a/TAO/tests/DynAny_Test/driver.cpp +++ /dev/null @@ -1,217 +0,0 @@ -// -*- c++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/tests/DynAny_Test -// -// = FILENAME -// driver.cpp -// -// = DESCRIPTION -// Implementation file for the driver program. -// -// = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> -// -// ============================================================================ - -#include "ace/Get_Opt.h" -#include "test_dynany.h" -#include "test_dynarray.h" -#include "test_dynenum.h" -#include "test_dynsequence.h" -#include "test_dynstruct.h" -#include "test_dynunion.h" -#include "test_wrapper.h" -#include "driver.h" - -int main (int argc, char* argv[]) -{ - Driver driver; - - // initialize the driver - if (driver.init (argc, argv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) driver.cpp - " - "Driver initialization failed\n"), - -1); - - // run the tests - if (driver.run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) driver.cpp - " - "tests failed\n"), - -1); - return 0; -} - -// constructor -Driver::Driver (void) - : orb_ (0), - test_type_ (NO_TEST) -{ -} - -// destructor -Driver::~Driver (void) -{ -} - -// initialize the driver -int -Driver::init (int argc, char* argv[]) -{ - TAO_TRY - { - // Retrieve the underlying ORB - this->orb_ = CORBA::ORB_init (argc, - argv, - "local", - TAO_TRY_ENV); - - TAO_CHECK_ENV; - - // Parse command line and verify parameters. - if (this->parse_args (argc, argv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) driver.cpp - " - "parse_args failed\n"), - -1); - - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Driver::init"); - return -1; - } - TAO_ENDTRY; - - return 0; -} - -int -Driver::parse_args (int argc, char* argv[]) -{ - if (argc == 1) - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s" - " -t [dynany|dynarray|dynenum|dynsequence|dynstruct|dynunion]" - "\n", - argv [0]), - -1); - - ACE_Get_Opt get_opts (argc, argv, "t:"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 't': - if (!ACE_OS::strcmp (get_opts.optarg, "dynany")) - this->test_type_ = TEST_DYNANY; - else if (!ACE_OS::strcmp (get_opts.optarg, "dynarray")) - this->test_type_ = TEST_DYNARRAY; - else if (!ACE_OS::strcmp (get_opts.optarg, "dynenum")) - this->test_type_ = TEST_DYNENUM; - else if (!ACE_OS::strcmp (get_opts.optarg, "dynsequence")) - this->test_type_ = TEST_DYNSEQUENCE; - else if (!ACE_OS::strcmp (get_opts.optarg, "dynstruct")) - this->test_type_ = TEST_DYNSTRUCT; - else if (!ACE_OS::strcmp (get_opts.optarg, "dynunion")) - this->test_type_ = TEST_DYNUNION; - break; - - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s" - " -t [dynany|dynarray|dynenum|dynsequence|dynstruct|dynunion]" - "\n", - argv [0]), - -1); - } - - // Indicates successful parsing of command line. - return 0; -} - -int -Driver::run (void) -{ - int retstatus = 0; - - switch (this->test_type_) - { - case TEST_DYNANY: - { - Test_Wrapper<Test_DynAny>* wrapper = - new Test_Wrapper<Test_DynAny> (new Test_DynAny (this->orb_)); - retstatus = wrapper->run_test (); - delete wrapper; - } - break; - case TEST_DYNARRAY: - { - Test_Wrapper<Test_DynArray>* wrapper = - new Test_Wrapper<Test_DynArray> (new Test_DynArray (this->orb_)); - retstatus = wrapper->run_test (); - delete wrapper; - } - break; - case TEST_DYNENUM: - { - Test_Wrapper<Test_DynEnum>* wrapper = - new Test_Wrapper<Test_DynEnum> (new Test_DynEnum (this->orb_)); - retstatus = wrapper->run_test (); - delete wrapper; - } - break; - case TEST_DYNSEQUENCE: - { - Test_Wrapper<Test_DynSequence>* wrapper = - new Test_Wrapper<Test_DynSequence> (new Test_DynSequence (this->orb_)); - retstatus = wrapper->run_test (); - delete wrapper; - } - break; - case TEST_DYNSTRUCT: - { - Test_Wrapper<Test_DynStruct>* wrapper = - new Test_Wrapper<Test_DynStruct> (new Test_DynStruct (this->orb_)); - retstatus = wrapper->run_test (); - delete wrapper; - } - break; - case TEST_DYNUNION: - { - Test_Wrapper<Test_DynUnion>* wrapper = - new Test_Wrapper<Test_DynUnion> (new Test_DynUnion (this->orb_)); - retstatus = wrapper->run_test (); - delete wrapper; - } - break; - default: - break; - } - - return retstatus; -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class Test_Wrapper<Test_DynAny>; -template class Test_Wrapper<Test_DynArray>; -template class Test_Wrapper<Test_DynEnum>; -template class Test_Wrapper<Test_DynSequence>; -template class Test_Wrapper<Test_DynStruct>; -template class Test_Wrapper<Test_DynUnion>; -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate Test_Wrapper<Test_DynAny> -#pragma instantiate Test_Wrapper<Test_DynArray> -#pragma instantiate Test_Wrapper<Test_DynEnum> -#pragma instantiate Test_Wrapper<Test_DynSequence> -#pragma instantiate Test_Wrapper<Test_DynStruct> -#pragma instantiate Test_Wrapper<Test_DynUnion> -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - diff --git a/TAO/tests/DynAny_Test/driver.h b/TAO/tests/DynAny_Test/driver.h deleted file mode 100644 index 9249218f53b..00000000000 --- a/TAO/tests/DynAny_Test/driver.h +++ /dev/null @@ -1,59 +0,0 @@ -// -*- c++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/tests/DynAny_Test -// -// = FILENAME -// driver.h -// -// = DESCRIPTION -// Header file for the driver program. -// -// = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> -// -// ============================================================================ - -#if !defined (DRIVER_H) -#define DRIVER_H - -#include "tao/corba.h" - -class Driver -{ -public: - // = Constructor and destructor. - Driver (void); - ~Driver (void); - -enum TEST_TYPE - { - NO_TEST, - TEST_DYNANY, - TEST_DYNARRAY, - TEST_DYNENUM, - TEST_DYNSEQUENCE, - TEST_DYNSTRUCT, - TEST_DYNUNION - }; - - int init (int argc, char* argv[]); - // Initialize the driver object. - - int parse_args (int argc, char* argv[]); - // Parse command line arguments. - - int run (void); - // Execute test code. - -private: - CORBA::ORB_var orb_; - // underlying ORB (we do not own it) - - TEST_TYPE test_type_; -}; - -#endif /* DRIVER_H */ diff --git a/TAO/tests/DynAny_Test/run_test.pl b/TAO/tests/DynAny_Test/run_test.pl deleted file mode 100755 index d16d5907fe5..00000000000 --- a/TAO/tests/DynAny_Test/run_test.pl +++ /dev/null @@ -1,58 +0,0 @@ -# $Id$ -# -*- perl -*- -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -use lib "../../../bin"; -require ACEutils; - -$type = ""; - -sub run_test -{ - my $type = shift(@_); - - system ($EXEPREFIX."basic_test -t $type"); - -} - -# Parse the arguments - -for ($i = 0; $i <= $#ARGV; $i++) -{ - SWITCH: - { - if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") - { - print "Run_Test Perl script for TAO DynAny Test\n\n"; - print "run_test [-t type]\n"; - print "\n"; - print "-t type -- runs only one type of dynany test\n"; - exit; - } - if ($ARGV[$i] eq "-t") - { - $type = $ARGV[$i + 1]; - $i++; - last SWITCH; - } - } -} - -@types = ("dynany", "dynarray", "dynenum", "dynsequence", "dynstruct", - "dynunion"); - -if ($type ne "") -{ - run_test ($type); -} -else -{ - foreach $type (@types) - { - run_test ($type); - } -} - - diff --git a/TAO/tests/DynAny_Test/test_dynany.cpp b/TAO/tests/DynAny_Test/test_dynany.cpp deleted file mode 100644 index ae6bc6c10b3..00000000000 --- a/TAO/tests/DynAny_Test/test_dynany.cpp +++ /dev/null @@ -1,180 +0,0 @@ -// -*- c++ -*- -// $Id$ -// ============================================================================ -// -// = LIBRARY -// TAO/tests/DynAny_Test -// -// = FILENAME -// test_dynany.cpp -// -// = DESCRIPTION -// Implementation of the basic test for simple DynAnys -// -// = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> -// -// ============================================================================ - -#include "test_dynany.h" -#include "data.h" - - -Test_DynAny::Test_DynAny (CORBA::ORB_var orb) - : orb_ (orb), - test_name_ (CORBA::string_dup ("test_dynany")), - error_count_ (0) -{ -} - -Test_DynAny::~Test_DynAny (void) -{ - CORBA::string_free (this->test_name_); - this->test_name_ = 0; -} - -const char* -Test_DynAny::test_name (void) const -{ - return this->test_name_; -} - -int -Test_DynAny::run_test (void) -{ - Data data (this->orb_); - - TAO_TRY - { - ACE_DEBUG ((LM_DEBUG, - "\t*=*=*=*= %s =*=*=*=*\n", - data.labels[8])); - - ACE_DEBUG ((LM_DEBUG, - "testing: constructor(Any)/insert/get\n")); - - CORBA_Any in1 (CORBA::_tc_double); - CORBA_DynAny_ptr fa1 = this->orb_->create_dyn_any (in1, - TAO_TRY_ENV); - TAO_CHECK_ENV; - fa1->insert_double (data.m_double1, - TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::Double d_out = fa1->get_double (TAO_TRY_ENV); - TAO_CHECK_ENV; - if (d_out == data.m_double1) - ACE_DEBUG ((LM_DEBUG, - "++ OK ++\n")); - else - ++this->error_count_; - - ACE_DEBUG ((LM_DEBUG, - "testing: constructor(TypeCode)/from_any/to_any\n")); - - d_out = data.m_double2; - CORBA_DynAny_ptr ftc1 = - this->orb_->create_basic_dyn_any (CORBA::_tc_double, - TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::Any in_any1; - in_any1 <<= data.m_double1; - ftc1->from_any (in_any1, - TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::Any* out_any1 = ftc1->to_any (TAO_TRY_ENV); - TAO_CHECK_ENV; - *out_any1 >>= d_out; - - // value in DynAny_i created with NEW - delete out_any1; - - if (d_out == data.m_double1) - ACE_DEBUG ((LM_DEBUG, - "++ OK ++\n")); - else - ++this->error_count_; - - fa1->destroy (TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::release (fa1); - ftc1->destroy (TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::release (ftc1); - - ACE_DEBUG ((LM_DEBUG, - "\t*=*=*=*= %s =*=*=*=*\n", - data.labels[12])); - - ACE_DEBUG ((LM_DEBUG, - "testing: constructor(Any)/insert/get\n")); - - CORBA_Any in (CORBA::_tc_TypeCode); - CORBA_DynAny_ptr fa2 = - this->orb_->create_dyn_any (in, - TAO_TRY_ENV); - TAO_CHECK_ENV; - fa2->insert_typecode (data.m_typecode1, - TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::TypeCode_ptr tc_out = fa2->get_typecode (TAO_TRY_ENV); - TAO_CHECK_ENV; - if (tc_out->equal (data.m_typecode1, - TAO_TRY_ENV)) - ACE_DEBUG ((LM_DEBUG, - "++ OK ++\n")); - else - ++this->error_count_; - - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, - "testing: constructor(TypeCode)/from_any/to_any\n")); - - tc_out = data.m_typecode2; - CORBA_DynAny_ptr ftc2 = - this->orb_->create_basic_dyn_any (CORBA::_tc_TypeCode, - TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::Any in_any2; - in_any2 <<= data.m_typecode1; - ftc2->from_any (in_any2, - TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::Any* out_any2 = ftc2->to_any (TAO_TRY_ENV); - TAO_CHECK_ENV; - *out_any2 >>= tc_out; - - // value in DynAny_i created with NEW - delete out_any2; - - if (tc_out->equal(data.m_typecode1, - TAO_TRY_ENV)) - ACE_DEBUG ((LM_DEBUG, - "++ OK ++\n")); - else - ++this->error_count_; - - TAO_CHECK_ENV; - - fa2->destroy (TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::release (fa2); - ftc2->destroy (TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::release (ftc2); - CORBA::release (tc_out); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("test_dynany::run_test"); - return -1; - } - TAO_ENDTRY; - - ACE_DEBUG ((LM_DEBUG, - "\n%d errors\n", - this->error_count_)); - - return 0; -} - diff --git a/TAO/tests/DynAny_Test/test_dynany.h b/TAO/tests/DynAny_Test/test_dynany.h deleted file mode 100644 index e282eb94f4e..00000000000 --- a/TAO/tests/DynAny_Test/test_dynany.h +++ /dev/null @@ -1,41 +0,0 @@ -// -*- c++ -*- -// $Id$ -// ============================================================================ -// -// = LIBRARY -// TAO/tests/DynAny_Test -// -// = FILENAME -// test_dynany.h -// -// = DESCRIPTION -// Header file for class to test the simple dynany. -// -// = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> -// -// ============================================================================ - -#if !defined (TEST_DYNANY_H) -#define TEST_DYNANY_H - -#include "tao/corba.h" - -class Test_DynAny -{ -public: - Test_DynAny (CORBA::ORB_var orb); - ~Test_DynAny (void); - - const char* test_name (void) const; - - int run_test (void); - -private: - CORBA::ORB_var orb_; - char* test_name_; - CORBA::ULong error_count_; -}; - -#endif /* TEST_DYNANY_H */ - diff --git a/TAO/tests/DynAny_Test/test_dynarray.cpp b/TAO/tests/DynAny_Test/test_dynarray.cpp deleted file mode 100644 index dfde047395c..00000000000 --- a/TAO/tests/DynAny_Test/test_dynarray.cpp +++ /dev/null @@ -1,160 +0,0 @@ -// -*- c++ -*- -// $Id$ -// ============================================================================ -// -// = LIBRARY -// TAO/tests/DynAny_Test -// -// = FILENAME -// test_dynarray.cpp -// -// = DESCRIPTION -// Implementation of the DynArray test -// -// = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> -// -// ============================================================================ - -#include "test_dynarray.h" -#include "da_testsC.h" -#include "data.h" - -Test_DynArray::Test_DynArray (CORBA::ORB_var orb) - : test_name_ (CORBA::string_dup ("test_dynarray")), - orb_ (orb), - error_count_ (0) -{ -} - -Test_DynArray::~Test_DynArray (void) -{ - CORBA::string_free (this->test_name_); - this->test_name_ = 0; -} - -const char* -Test_DynArray::test_name (void) const -{ - return this->test_name_; -} - -int -Test_DynArray::run_test (void) -{ - Data data (this->orb_); - - DynAnyTests::test_array ta = {0}; - - TAO_TRY - { - ACE_DEBUG ((LM_DEBUG, - "\t*=*=*=*= %s =*=*=*=*\n", - data.labels[4])); - - ACE_DEBUG ((LM_DEBUG, - "testing: constructor(Any)/insert/get/seek/rewind/current_component\n")); - - CORBA::Any in_any1; - in_any1 <<= ta; - CORBA_DynAny_ptr dp1 = this->orb_->create_dyn_any (in_any1, - TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA_DynArray_ptr fa1 = CORBA_DynArray::_narrow (dp1, - TAO_TRY_ENV); - TAO_CHECK_ENV; - fa1->seek (1, - TAO_TRY_ENV); - TAO_CHECK_ENV; - fa1->insert_long (data.m_long1, - TAO_TRY_ENV); - TAO_CHECK_ENV; - fa1->rewind (TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::Long l_out1 = data.m_long2; - fa1->seek (1, - TAO_TRY_ENV); - TAO_CHECK_ENV; - l_out1 = fa1->get_long (TAO_TRY_ENV); - TAO_CHECK_ENV; - if (l_out1 == data.m_long1) - ACE_DEBUG ((LM_DEBUG, - "++ OK ++\n")); - else - ++this->error_count_; - - ACE_DEBUG ((LM_DEBUG, - "testing: constructor(TypeCode)/from_any/to_any\n")); - - CORBA_DynArray_ptr ftc1 = - this->orb_->create_dyn_array (DynAnyTests::_tc_test_array, - TAO_TRY_ENV); - TAO_CHECK_ENV; - ta[1] = data.m_long1; - CORBA::Any in_any2; - in_any2 <<= ta; - ftc1->from_any (in_any2, - TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::Any* out_any1 = ftc1->to_any (TAO_TRY_ENV); - TAO_CHECK_ENV; - DynAnyTests::test_array_forany ta_out; - *out_any1 >>= ta_out; - - if (ta_out[(CORBA::ULong) 1] == data.m_long1) - ACE_DEBUG ((LM_DEBUG, - "++ OK ++\n")); - else - ++this->error_count_; - - // Created with NEW - delete out_any1; - - ACE_DEBUG ((LM_DEBUG, - "testing: set_elements/get_elements\n")); - - AnySeq as_in (2); - as_in.length (2); - CORBA::Any in_any3; - in_any3 <<= data.m_long1; - as_in[0] = in_any3; - as_in[1] = in_any3; - ftc1->set_elements (as_in, - TAO_TRY_ENV); - TAO_CHECK_ENV; - AnySeq* as_out = ftc1->get_elements (TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA_Any out_any2 = (*as_out)[1]; - CORBA::Long l_out2; - out_any2 >>= l_out2; - if (l_out2 == data.m_long1) - ACE_DEBUG ((LM_DEBUG, - "++ OK ++\n")); - else - ++this->error_count_; - - // Created with NEW - delete as_out; - - fa1->destroy (TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::release (fa1); - ftc1->destroy (TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::release (ftc1); - CORBA::release (dp1); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("test_dynarray::run_test"); - return -1; - } - TAO_ENDTRY; - - ACE_DEBUG ((LM_DEBUG, - "\n%d errors\n", - this->error_count_)); - - return 0; -} - diff --git a/TAO/tests/DynAny_Test/test_dynarray.h b/TAO/tests/DynAny_Test/test_dynarray.h deleted file mode 100644 index 9ac0c71658b..00000000000 --- a/TAO/tests/DynAny_Test/test_dynarray.h +++ /dev/null @@ -1,41 +0,0 @@ -// -*- c++ -*- -// $Id$ -// ============================================================================ -// -// = LIBRARY -// TAO/tests/DynAny_Test -// -// = FILENAME -// test_dynarray.h -// -// = DESCRIPTION -// Header file for class to test DynArray. -// -// = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> -// -// ============================================================================ - -#if !defined (TEST_DYNARRAY_H) -#define TEST_DYNARRAY_H - -#include "tao/corba.h" - -class Test_DynArray -{ -public: - Test_DynArray (CORBA::ORB_var orb); - ~Test_DynArray (void); - - const char* test_name (void) const; - - int run_test (void); - -private: - char* test_name_; - CORBA::ORB_var orb_; - CORBA::ULong error_count_; -}; - -#endif /* TEST_DYNARRAY_H */ - diff --git a/TAO/tests/DynAny_Test/test_dynenum.cpp b/TAO/tests/DynAny_Test/test_dynenum.cpp deleted file mode 100644 index b34ee1770ff..00000000000 --- a/TAO/tests/DynAny_Test/test_dynenum.cpp +++ /dev/null @@ -1,131 +0,0 @@ -// -*- c++ -*- -// $Id$ -// ============================================================================ -// -// = LIBRARY -// TAO/tests/DynAny_Test -// -// = FILENAME -// test_dynenum.cpp -// -// = DESCRIPTION -// Implementation of the simple DynEnum test -// -// = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> -// -// ============================================================================ - -#include "test_dynenum.h" -#include "da_testsC.h" -#include "data.h" - -Test_DynEnum::Test_DynEnum (CORBA::ORB_var orb) - : test_name_ (CORBA::string_dup ("test_dynenum")), - orb_ (orb), - error_count_ (0) -{ -} - -Test_DynEnum::~Test_DynEnum (void) -{ - CORBA::string_free (this->test_name_); - this->test_name_ = 0; -} - -const char* -Test_DynEnum::test_name (void) const -{ - return this->test_name_; -} - -int -Test_DynEnum::run_test (void) -{ - DynAnyTests::test_enum te = DynAnyTests::ZEROTH; - - TAO_TRY - { - ACE_DEBUG ((LM_DEBUG, - "testing: constructor(Any)/value_as_ulong\n")); - - CORBA_Any in_any1; - in_any1 <<= te; - CORBA_DynAny_ptr dp1 = this->orb_->create_dyn_any (in_any1, - TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA_DynEnum_ptr de1 = CORBA_DynEnum::_narrow (dp1, - TAO_TRY_ENV); - TAO_CHECK_ENV; - de1->value_as_ulong (2, - TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::ULong ul_out1 = de1->value_as_ulong (TAO_TRY_ENV); - TAO_CHECK_ENV; - if (ul_out1 == 2) - ACE_DEBUG ((LM_DEBUG, - "++ OK ++\n")); - else - ++this->error_count_; - - ACE_DEBUG ((LM_DEBUG, - "testing: value_as_string\n")); - - de1->value_as_string ("FIRST", - TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::String_var s = de1->value_as_string (TAO_TRY_ENV); - TAO_CHECK_ENV; - if (!ACE_OS::strcmp (s.in (), "FIRST")) - ACE_DEBUG ((LM_DEBUG, - "++ OK ++\n")); - else - ++this->error_count_; - - - ACE_DEBUG ((LM_DEBUG, - "testing: constructor(TypeCode)/from_any/to_any\n")); - - CORBA_DynEnum_ptr de2 = - this->orb_->create_dyn_enum (DynAnyTests::_tc_test_enum, - TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA_Any in_any2; - in_any2 <<= DynAnyTests::THIRD; - de2->from_any (in_any2, - TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA_Any* out_any1 = de2->to_any (TAO_TRY_ENV); - TAO_CHECK_ENV; - *out_any1 >>= te; - if (te == DynAnyTests::THIRD) - ACE_DEBUG ((LM_DEBUG, - "++ OK ++\n")); - else - ++this->error_count_; - - // Created with NEW - delete out_any1; - - de1->destroy (TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::release (de1); - de2->destroy (TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::release (de2); - CORBA::release (dp1); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("test_dynenum::run_test"); - return -1; - } - TAO_ENDTRY; - - ACE_DEBUG ((LM_DEBUG, - "\n%d errors\n", - this->error_count_)); - - return 0; -} - diff --git a/TAO/tests/DynAny_Test/test_dynenum.h b/TAO/tests/DynAny_Test/test_dynenum.h deleted file mode 100644 index 830122739a2..00000000000 --- a/TAO/tests/DynAny_Test/test_dynenum.h +++ /dev/null @@ -1,41 +0,0 @@ -// -*- c++ -*- -// $Id$ -// ============================================================================ -// -// = LIBRARY -// TAO/tests/DynAny_Test -// -// = FILENAME -// test_dynenum.h -// -// = DESCRIPTION -// Header file for class to test DynEnum. -// -// = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> -// -// ============================================================================ - -#if !defined (TEST_DYNENUM_H) -#define TEST_DYNENUM_H - -#include "tao/corba.h" - -class Test_DynEnum -{ -public: - Test_DynEnum (CORBA::ORB_var orb); - ~Test_DynEnum (void); - - const char* test_name (void) const; - - int run_test (void); - -private: - char* test_name_; - CORBA::ORB_var orb_; - CORBA::ULong error_count_; -}; - -#endif /* TEST_DYNENUM_H */ - diff --git a/TAO/tests/DynAny_Test/test_dynsequence.cpp b/TAO/tests/DynAny_Test/test_dynsequence.cpp deleted file mode 100644 index 238385f4796..00000000000 --- a/TAO/tests/DynAny_Test/test_dynsequence.cpp +++ /dev/null @@ -1,173 +0,0 @@ -// -*- c++ -*- -// $Id$ -// ============================================================================ -// -// = LIBRARY -// TAO/tests/DynAny_Test -// -// = FILENAME -// test_dynsequence.cpp -// -// = DESCRIPTION -// Implementation of the simple DynSequence test -// -// = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> -// -// ============================================================================ - -#include "test_dynsequence.h" -#include "da_testsC.h" -#include "data.h" - -Test_DynSequence::Test_DynSequence (CORBA::ORB_var orb) - : test_name_ (CORBA::string_dup ("test_dynsequence")), - orb_ (orb), - error_count_ (0) -{ -} - -Test_DynSequence::~Test_DynSequence (void) -{ - CORBA::string_free (this->test_name_); - this->test_name_ = 0; -} - -const char* -Test_DynSequence::test_name (void) const -{ - return this->test_name_; -} - -int -Test_DynSequence::run_test (void) -{ - Data data (this->orb_); - - DynAnyTests::test_seq ts (2); - ts.length (2); - - TAO_TRY - { - ACE_DEBUG ((LM_DEBUG, - "\t*=*=*=*= %s =*=*=*=*\n", - data.labels[11])); - - ACE_DEBUG ((LM_DEBUG, - "testing: constructor(Any)/insert/get/seek/rewind/current_component\n")); - - ts[0] = data.m_string2; - ts[1] = data.m_string2; - CORBA_Any in_any1; - in_any1 <<= ts; - CORBA_DynAny_ptr dp1 = - this->orb_->create_dyn_any (in_any1, - TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA_DynSequence_ptr fa1 = CORBA_DynSequence::_narrow (dp1, - TAO_TRY_ENV); - TAO_CHECK_ENV; - fa1->seek (1, - TAO_TRY_ENV); - TAO_CHECK_ENV; - fa1->insert_string (data.m_string1, - TAO_TRY_ENV); - TAO_CHECK_ENV; - fa1->rewind (TAO_TRY_ENV); - TAO_CHECK_ENV; - fa1->seek (1, - TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::String out_str1 = fa1->get_string (TAO_TRY_ENV); - TAO_CHECK_ENV; - if (!ACE_OS::strcmp (out_str1, data.m_string1)) - ACE_DEBUG ((LM_DEBUG, - "++ OK ++\n")); - else - ++this->error_count_; - - ACE_DEBUG ((LM_DEBUG, - "testing: constructor(TypeCode)/from_any/to_any\n")); - - CORBA_DynSequence_ptr ftc1 = - this->orb_->create_dyn_sequence (DynAnyTests::_tc_test_seq, - TAO_TRY_ENV); - TAO_CHECK_ENV; - ts[0] = data.m_string1; - CORBA_Any in_any2; - in_any2 <<= ts; - ftc1->from_any (in_any2, - TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::Any* out_any1 = ftc1->to_any (TAO_TRY_ENV); - TAO_CHECK_ENV; - DynAnyTests::test_seq* ts_out; - *out_any1 >>= ts_out; - if (!ACE_OS::strcmp ((*ts_out)[0], data.m_string1)) - ACE_DEBUG ((LM_DEBUG, - "++ OK ++\n")); - else - ++this->error_count_; - - // Created with NEW - delete out_any1; - - - ACE_DEBUG ((LM_DEBUG, - "testing: length/set_elements/get_elements\n")); - - if (ftc1->length (TAO_TRY_ENV) != 2) - ++this->error_count_; - TAO_CHECK_ENV; - - ftc1->length (3, - TAO_TRY_ENV); - TAO_CHECK_ENV; - AnySeq as_in (3); - as_in.length (3); - CORBA_Any in_any3; - in_any3 <<= CORBA::Any::from_string (data.m_string2, 0); - as_in[0] = in_any3; - as_in[1] = in_any3; - in_any3 <<= CORBA::Any::from_string (data.m_string1, 0); - as_in[2] = in_any3; - ftc1->set_elements (as_in, - TAO_TRY_ENV); - TAO_CHECK_ENV; - AnySeq* as_out = ftc1->get_elements (TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA_Any out_any2 = (*as_out)[2]; - CORBA::String out_str2; - out_any2 >>= CORBA::Any::to_string (out_str2, 0); - if (ACE_OS::strcmp (out_str2, data.m_string1)) - ++this->error_count_; - if (this->error_count_ == 0) - ACE_DEBUG ((LM_DEBUG, - "++ OK ++\n")); - - // Created with NEW - delete as_out; - delete out_str2; - - fa1->destroy (TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::release (fa1); - CORBA::release (dp1); - ftc1->destroy (TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::release (ftc1); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("test_dynsequence::run_test"); - return -1; - } - TAO_ENDTRY; - - ACE_DEBUG ((LM_DEBUG, - "\n%d errors\n", - this->error_count_)); - - - return 0; -} diff --git a/TAO/tests/DynAny_Test/test_dynsequence.h b/TAO/tests/DynAny_Test/test_dynsequence.h deleted file mode 100644 index 1b53a76b866..00000000000 --- a/TAO/tests/DynAny_Test/test_dynsequence.h +++ /dev/null @@ -1,41 +0,0 @@ -// -*- c++ -*- -// $Id$ -// ============================================================================ -// -// = LIBRARY -// TAO/tests/DynAny_Test -// -// = FILENAME -// test_dynsequence.h -// -// = DESCRIPTION -// Header file for class to test DynSequence. -// -// = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> -// -// ============================================================================ - -#if !defined (TEST_DYNSEQUENCE_H) -#define TEST_DYNSEQUENCE_H - -#include "tao/corba.h" - -class Test_DynSequence -{ -public: - Test_DynSequence (CORBA::ORB_var orb); - ~Test_DynSequence (void); - - const char* test_name (void) const; - - int run_test (void); - -private: - char* test_name_; - CORBA::ORB_var orb_; - CORBA::ULong error_count_; -}; - -#endif /* TEST_DYNSEQUENCE_H */ - diff --git a/TAO/tests/DynAny_Test/test_dynstruct.cpp b/TAO/tests/DynAny_Test/test_dynstruct.cpp deleted file mode 100644 index 2cdf9688b64..00000000000 --- a/TAO/tests/DynAny_Test/test_dynstruct.cpp +++ /dev/null @@ -1,193 +0,0 @@ -// -*- c++ -*- -// $Id$ -// ============================================================================ -// -// = LIBRARY -// TAO/tests/DynAny_Test -// -// = FILENAME -// test_dynstruct.cpp -// -// = DESCRIPTION -// Implementation of the DynStruct basic test -// -// = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> -// -// ============================================================================ - -#include "test_dynstruct.h" -#include "da_testsC.h" -#include "data.h" - -Test_DynStruct::Test_DynStruct (CORBA::ORB_var orb) - : test_name_ (CORBA::string_dup ("test_dynstruct")), - orb_ (orb), - error_count_ (0) -{ -} - -Test_DynStruct::~Test_DynStruct (void) -{ - CORBA::string_free (this->test_name_); - this->test_name_ = 0; -} - -const char* -Test_DynStruct::test_name (void) const -{ - return this->test_name_; -} - -int -Test_DynStruct::run_test (void) -{ - Data data (this->orb_); - - DynAnyTests::test_struct ts; - ts.c = data.m_char2; - ts.ll = data.m_longlong2; - ts.es.f = data.m_float2; - ts.es.s = data.m_short2; - - TAO_TRY - { - ACE_DEBUG ((LM_DEBUG, - "testing: constructor(Any)/insert/get/next/seek/rewind/current_component\n")); - - CORBA_Any in_any1; - in_any1 <<= ts; - CORBA_DynAny_ptr dp1 = - this->orb_->create_dyn_any (in_any1, - TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA_DynStruct_ptr fa1 = CORBA_DynStruct::_narrow (dp1, - TAO_TRY_ENV); - TAO_CHECK_ENV; - fa1->insert_char (data.m_char1, - TAO_TRY_ENV); - TAO_CHECK_ENV; - fa1->insert_longlong (data.m_longlong1, - TAO_TRY_ENV); - TAO_CHECK_ENV; - fa1->current_component (TAO_TRY_ENV)->insert_float (data.m_float1, - TAO_TRY_ENV); - TAO_CHECK_ENV; - fa1->current_component (TAO_TRY_ENV)->insert_short (data.m_short1, - TAO_TRY_ENV); - TAO_CHECK_ENV; - fa1->current_component (TAO_TRY_ENV)->rewind (TAO_TRY_ENV); - TAO_CHECK_ENV; - fa1->rewind (TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::Char c = fa1->get_char (TAO_TRY_ENV); - TAO_CHECK_ENV; - if (c != data.m_char1) - ++this->error_count_; - CORBA::LongLong ll = fa1->get_longlong (TAO_TRY_ENV); - TAO_CHECK_ENV; - if (ll != data.m_longlong1) - ++this->error_count_; - fa1->current_component(TAO_TRY_ENV)->seek (1, - TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::Short s = fa1->current_component (TAO_TRY_ENV)->get_short (TAO_TRY_ENV); - TAO_CHECK_ENV; - if (s != data.m_short1) - ++this->error_count_; - if (this->error_count_ == 0) - ACE_DEBUG ((LM_DEBUG, - "++ OK ++\n")); - - ACE_DEBUG ((LM_DEBUG, - "testing: constructor(TypeCode)/from_any/to_any\n")); - - CORBA_DynStruct_ptr ftc1 = - this->orb_->create_dyn_struct (DynAnyTests::_tc_test_struct, - TAO_TRY_ENV); - TAO_CHECK_ENV; - ts.c = data.m_char1; - ts.ll = data.m_longlong1; - ts.es.f = data.m_float1; - ts.es.s = data.m_short1; - CORBA_Any in_any2; - in_any2 <<= ts; - ftc1->from_any (in_any2, - TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA_Any* out_any1 = ftc1->to_any (TAO_TRY_ENV); - TAO_CHECK_ENV; - DynAnyTests::test_struct* ts_out; - *out_any1 >>= ts_out; - if (ts_out->es.s == data.m_short1) - ACE_DEBUG ((LM_DEBUG, - "++ OK ++\n")); - else - ++this->error_count_; - - // Created with NEW - delete out_any1; - - ACE_DEBUG ((LM_DEBUG, - "testing: current_member_name/current_member_kind\n")); - - ftc1->seek (2, - TAO_TRY_ENV); - TAO_CHECK_ENV; - FieldName fn = ftc1->current_member_name (TAO_TRY_ENV); - TAO_CHECK_ENV; - if (ACE_OS::strcmp (fn, "es")) - ++this->error_count_; - CORBA::TCKind tk = ftc1->current_member_kind (TAO_TRY_ENV); - TAO_CHECK_ENV; - if (tk != CORBA::tk_struct) - ++this->error_count_; - if (this->error_count_ == 0) - ACE_DEBUG ((LM_DEBUG, - "++ OK ++\n")); - - ACE_DEBUG ((LM_DEBUG, - "testing: get_members/set_members\n")); - - NameValuePairSeq* nvps = fa1->get_members (TAO_TRY_ENV); - CORBA_DynStruct_ptr sm = - this->orb_->create_dyn_struct (DynAnyTests::_tc_test_struct, - TAO_TRY_ENV); - TAO_CHECK_ENV; - sm->set_members (*nvps, - TAO_TRY_ENV); - TAO_CHECK_ENV; - NameValuePairSeq* gm = sm->get_members (TAO_TRY_ENV); - TAO_CHECK_ENV; - if (ACE_OS::strcmp ((*gm)[2].id, "es")) - ++this->error_count_; - - // Created with NEW - delete nvps; - delete gm; - - fa1->destroy (TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::release (fa1); - CORBA::release (dp1); - ftc1->destroy (TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::release (ftc1); - sm->destroy (TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::release (sm); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("test_dynstruct::run_test"); - return -1; - } - TAO_ENDTRY; - - ACE_DEBUG ((LM_DEBUG, - "\n%d errors\n", - this->error_count_)); - - return 0; -} - diff --git a/TAO/tests/DynAny_Test/test_dynstruct.h b/TAO/tests/DynAny_Test/test_dynstruct.h deleted file mode 100644 index 770c496d672..00000000000 --- a/TAO/tests/DynAny_Test/test_dynstruct.h +++ /dev/null @@ -1,41 +0,0 @@ -// -*- c++ -*- -// $Id$ -// ============================================================================ -// -// = LIBRARY -// TAO/tests/DynAny_Test -// -// = FILENAME -// test_dynstruct.h -// -// = DESCRIPTION -// Header file for class to test DynStruct. -// -// = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> -// -// ============================================================================ - -#if !defined (TEST_DYNSTRUCT_H) -#define TEST_DYNSTRUCT_H - -#include "tao/corba.h" - -class Test_DynStruct -{ -public: - Test_DynStruct (CORBA::ORB_var orb); - ~Test_DynStruct (void); - - const char* test_name (void) const; - - int run_test (void); - -private: - char* test_name_; - CORBA::ORB_var orb_; - CORBA::ULong error_count_; -}; - -#endif /* TEST_DYNSTRUCT_H */ - diff --git a/TAO/tests/DynAny_Test/test_dynunion.cpp b/TAO/tests/DynAny_Test/test_dynunion.cpp deleted file mode 100644 index 33abad947ad..00000000000 --- a/TAO/tests/DynAny_Test/test_dynunion.cpp +++ /dev/null @@ -1,171 +0,0 @@ -// -*- c++ -*- -// $Id$ -// ============================================================================ -// -// = LIBRARY -// TAO/tests/DynAny_Test -// -// = FILENAME -// test_dynunion.cpp -// -// = DESCRIPTION -// Implementation of the simple DynUnion test -// -// = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> -// -// ============================================================================ - -#include "test_dynunion.h" -#include "da_testsC.h" -#include "data.h" - -Test_DynUnion::Test_DynUnion (CORBA::ORB_var orb) - : test_name_ (CORBA::string_dup ("test_dynunion")), - orb_ (orb), - error_count_ (0) -{ -} - -Test_DynUnion::~Test_DynUnion (void) -{ - CORBA::string_free (this->test_name_); - this->test_name_ = 0; -} - -const char* -Test_DynUnion::test_name (void) const -{ - return this->test_name_; -} - -int -Test_DynUnion::run_test (void) -{ - Data data (this->orb_); - - DynAnyTests::test_union tu; - - TAO_TRY - { - ACE_DEBUG ((LM_DEBUG, - "\t*=*=*=*= %s =*=*=*=*\n", - data.labels[3])); - - ACE_DEBUG ((LM_DEBUG, - "testing: constructor(Any)/insert/get\n")); - - tu._d(DynAnyTests::FIRST); - tu.s (data.m_short2); - CORBA_Any in_any1; - in_any1 <<= tu; - CORBA_DynAny_ptr dp1 = - this->orb_->create_dyn_any (in_any1, - TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA_DynUnion_ptr fa1 = CORBA_DynUnion::_narrow (dp1, - TAO_TRY_ENV); - TAO_CHECK_ENV; - fa1->insert_short (data.m_short1, - TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::Short s_out1 = fa1->get_short (TAO_TRY_ENV); - TAO_CHECK_ENV; - if (s_out1 == data.m_short1) - ACE_DEBUG ((LM_DEBUG, - "++ OK ++\n")); - else - ++this->error_count_; - - ACE_DEBUG ((LM_DEBUG, - "testing: constructor(TypeCode)/from_any/to_any\n")); - - CORBA_Any* out_any1 = fa1->to_any (TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA_DynUnion_ptr ftc1 = - this->orb_->create_dyn_union (DynAnyTests::_tc_test_union, - TAO_TRY_ENV); - TAO_CHECK_ENV; - ftc1->from_any (*out_any1, - TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::Short s_out2 = ftc1->get_short (TAO_TRY_ENV); - TAO_CHECK_ENV; - if (s_out2 == data.m_short1) - ACE_DEBUG ((LM_DEBUG, - "++ OK ++\n")); - else - ++this->error_count_; - - // Created with NEW - delete out_any1; - - ACE_DEBUG ((LM_DEBUG, - "testing: set_as_default\n")); - - if (!ftc1->set_as_default (TAO_TRY_ENV)) - ACE_DEBUG ((LM_DEBUG, - "++ OK ++\n")); - else - ++this->error_count_; - - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, - "testing:discriminator/discriminator_kind\n")); - - CORBA_DynAny_ptr dp2 = ftc1->discriminator (TAO_TRY_ENV); - TAO_CHECK_ENV; - if (dp2->type (TAO_TRY_ENV)->kind () - == ftc1->discriminator_kind (TAO_TRY_ENV)) - ACE_DEBUG ((LM_DEBUG, - "++ OK ++\n")); - else - ++this->error_count_; - - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, - "testing:member/member_kind/member_name\n")); - - CORBA_DynAny_ptr dp3 = ftc1->member (TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::String m_nm = ftc1->member_name (TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::TCKind tk = ftc1->member_kind (TAO_TRY_ENV); - TAO_CHECK_ENV; - if (!ACE_OS::strcmp (m_nm, "s") && - tk == CORBA::tk_short && - dp3->get_short (TAO_TRY_ENV) == data.m_short1) - ACE_DEBUG ((LM_DEBUG, - "++ OK ++\n")); - else - ++this->error_count_; - - TAO_CHECK_ENV; - - // Created with string_dup - CORBA::string_free (m_nm); - - fa1->destroy (TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::release (fa1); - CORBA::release (dp1); - ftc1->destroy (TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::release (ftc1); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("test_dynunion::run_test"); - return -1; - } - TAO_ENDTRY; - - ACE_DEBUG ((LM_DEBUG, - "\n%d errors\n", - this->error_count_)); - - return 0; -} - diff --git a/TAO/tests/DynAny_Test/test_dynunion.h b/TAO/tests/DynAny_Test/test_dynunion.h deleted file mode 100644 index 0f5c7c51ab0..00000000000 --- a/TAO/tests/DynAny_Test/test_dynunion.h +++ /dev/null @@ -1,41 +0,0 @@ -// -*- c++ -*- -// $Id$ -// ============================================================================ -// -// = LIBRARY -// TAO/tests/DynAny_Test -// -// = FILENAME -// test_dynunion.h -// -// = DESCRIPTION -// Header file for class to test DynUnion. -// -// = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> -// -// ============================================================================ - -#if !defined (TEST_DYNUNION_H) -#define TEST_DYNUNION_H - -#include "tao/corba.h" - -class Test_DynUnion -{ -public: - Test_DynUnion (CORBA::ORB_var orb); - ~Test_DynUnion (void); - - const char* test_name (void) const; - - int run_test (void); - -private: - char* test_name_; - CORBA::ORB_var orb_; - CORBA::ULong error_count_; -}; - -#endif /* TEST_DYNUNION_H */ - diff --git a/TAO/tests/DynAny_Test/test_wrapper.cpp b/TAO/tests/DynAny_Test/test_wrapper.cpp deleted file mode 100644 index 61415f60fef..00000000000 --- a/TAO/tests/DynAny_Test/test_wrapper.cpp +++ /dev/null @@ -1,61 +0,0 @@ -// -*- c++ -*- -// $Id$ -// ============================================================================ -// -// = LIBRARY -// TAO/tests/DynAny_Test -// -// = FILENAME -// test_wrapper.cpp -// -// = DESCRIPTION -// This file contains the implementation of the DynAny basic test manager -// -// = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> -// -// ============================================================================ - -#if !defined (TEST_WRAPPER_CPP) -#define TEST_WRAPPER_CPP - -#include "test_wrapper.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 */ diff --git a/TAO/tests/DynAny_Test/test_wrapper.h b/TAO/tests/DynAny_Test/test_wrapper.h deleted file mode 100644 index b4f2b8d1cd9..00000000000 --- a/TAO/tests/DynAny_Test/test_wrapper.h +++ /dev/null @@ -1,49 +0,0 @@ -// -*- c++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/tests/DynAny_Test -// -// = FILENAME -// test_wrapper.h -// -// = DESCRIPTION -// Header file for the DynAny basic test manager -// -// = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> -// -// ============================================================================ - -#if !defined (TEST_WRAPPER_H) -#define TEST_WRAPPER_H - -template <class T> -class Test_Wrapper -{ -public: - typedef T TEST_OBJECT; - - // constructor and destructor - Test_Wrapper (T *); - - ~Test_Wrapper (void); - - int run_test (void); - -private: - // This does all the work. - TEST_OBJECT* test_object_; -}; - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "test_wrapper.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation "test_wrapper.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#endif /* TEST_WRAPPER_H */ |