diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-09-13 01:28:48 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-09-13 01:28:48 +0000 |
commit | 47f90de13c5a9a118eaf788a5365deb0bedacb11 (patch) | |
tree | 7e39566aee1b9842c68c944b6de6a1029c71a968 /TAO/tests/Collocation | |
parent | 4c76ed621be9063c99c8e9be1a2cfee00dcd0ebf (diff) | |
download | ATCD-47f90de13c5a9a118eaf788a5365deb0bedacb11.tar.gz |
CVS mistake. This file should have gone to the Thread_Pool_stage_3 branch.
Diffstat (limited to 'TAO/tests/Collocation')
-rw-r--r-- | TAO/tests/Collocation/Collocation_Test_Stubs.bor | 38 | ||||
-rw-r--r-- | TAO/tests/Collocation/Collocation_Test_Stubs.dsp | 206 | ||||
-rw-r--r-- | TAO/tests/Collocation/Collocation_Tester.cpp | 156 | ||||
-rw-r--r-- | TAO/tests/Collocation/Collocation_Tester.h | 64 |
4 files changed, 0 insertions, 464 deletions
diff --git a/TAO/tests/Collocation/Collocation_Test_Stubs.bor b/TAO/tests/Collocation/Collocation_Test_Stubs.bor deleted file mode 100644 index 7a3baf5a8d9..00000000000 --- a/TAO/tests/Collocation/Collocation_Test_Stubs.bor +++ /dev/null @@ -1,38 +0,0 @@ -# -# Makefile for building the Collocation_Test_Stubs library -# - -NAME = Collocation_Test_Stubs - -TAO_IDL = $(CORE_BINDIR)\tao_idl -g $(CORE_BINDIR)\gperf.exe -Ge 1 -Gd \ - -Wb,skel_export_macro=Diamond_Export -Wb,stub_export_macro=MY_Stub_Export \ - -Wb,skel_export_include=diamond_export.h -Wb,stub_export_include=stub_export.h - -OBJFILES = \ - $(OBJDIR)\DiamondC.obj - -CFLAGS = \ - $(ACE_CFLAGS) \ - $(TAO_CFLAGS) \ - -DMY_STUB_HAS_DLL=1 \ - -DMY_STUB_BUILD_DLL=1 - -LIBFILES = \ - $(ACE_LIB) \ - $(TAO_LIB) - -IDLFILES = \ - $(IDLDIR)\Diamond.idl - -CPPDIR = . - -IDLDIR = . - -!include <$(ACE_ROOT)\include\makeinclude\build_dll.bor> - -# -# IDL Build rules -# - -$(IDLDIR)\DiamondS.cpp $(IDLDIR)\DiamondC.cpp: $(IDLDIR)\Diamond.idl - $(TAO_IDL) $** diff --git a/TAO/tests/Collocation/Collocation_Test_Stubs.dsp b/TAO/tests/Collocation/Collocation_Test_Stubs.dsp deleted file mode 100644 index 5e52cba1480..00000000000 --- a/TAO/tests/Collocation/Collocation_Test_Stubs.dsp +++ /dev/null @@ -1,206 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Collocation Test Stubs DLL" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=Collocation Test Stubs DLL - 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 "Collocation_Test_Stubs.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 "Collocation_Test_Stubs.mak" CFG="Collocation Test Stubs DLL - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Collocation Test Stubs DLL - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "Collocation Test Stubs DLL - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "Collocation Test Stubs DLL - 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 /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\\" /I "..\..\\" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "MY_STUB_BUILD_DLL" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# 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 /dll /machine:I386
-# ADD LINK32 ace.lib tao.lib /nologo /dll /machine:I386 /libpath:"..\..\..\ace" /libpath:"..\..\tao"
-
-!ELSEIF "$(CFG)" == "Collocation Test Stubs DLL - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Collocation_Test_Stubs___Win32_Debug"
-# PROP BASE Intermediate_Dir "Collocation_Test_Stubs___Win32_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 /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\\" /I "..\..\\" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "MY_STUB_BUILD_DLL" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# 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 /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 aced.lib taod.lib /nologo /dll /debug /machine:I386 /out:"Collocation_Test_Stubsd.dll" /pdbtype:sept /libpath:"..\..\..\ace" /libpath:"..\..\tao"
-
-!ENDIF
-
-# Begin Target
-
-# Name "Collocation Test Stubs DLL - Win32 Release"
-# Name "Collocation Test Stubs DLL - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\DiamondC.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\DiamondC.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\stub_export.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# Begin Group "IDL Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\Diamond.idl
-
-!IF "$(CFG)" == "Collocation Test Stubs DLL - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__DIAMO="..\..\..\bin\release\tao_idl.exe"
-# Begin Custom Build - Invoking tao_idl on $(InputName).idl
-InputPath=.\Diamond.idl
-InputName=Diamond
-
-BuildCmds= \
- ..\..\..\bin\release\tao_idl.exe -Ge 1 -Gd -Wb,skel_export_macro=Diamond_Export -Wb,stub_export_macro=MY_Stub_Export -Wb,skel_export_include=diamond_export.h -Wb,stub_export_include=stub_export.h $(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)" == "Collocation Test Stubs DLL - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__DIAMO="..\..\..\bin\tao_idl.exe"
-# Begin Custom Build - Invoking tao_idl on $(InputName).idl
-InputPath=.\Diamond.idl
-InputName=Diamond
-
-BuildCmds= \
- ..\..\..\bin\tao_idl.exe -Ge 1 -Gd -Wb,skel_export_macro=Diamond_Export -Wb,stub_export_macro=MY_Stub_Export -Wb,skel_export_include=diamond_export.h -Wb,stub_export_include=stub_export.h $(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/Collocation/Collocation_Tester.cpp b/TAO/tests/Collocation/Collocation_Tester.cpp deleted file mode 100644 index 7dba0e02c44..00000000000 --- a/TAO/tests/Collocation/Collocation_Tester.cpp +++ /dev/null @@ -1,156 +0,0 @@ -// $Id$ - -//============================================================================ -// -// =FILENAME -// Collocation_Test.h -// -// =DESCRIPTION -// Server class to perform testing of TAO's collocation mechanism. -// -// =AUTHOR -// Nanbor Wang -// -//============================================================================= - -#include "Collocation_Tester.h" - -Collocation_Test::Collocation_Test (void) -{ - // no-op. -} - -void -Collocation_Test::shutdown (CORBA::Environment &ACE_TRY_ENV) -{ - this->root_poa_->destroy (1, 1, ACE_TRY_ENV); - ACE_CHECK; - this->orb_->destroy (ACE_TRY_ENV); - ACE_CHECK; -} - -int -Collocation_Test::init (int argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) -{ - // Initialize the ORB. - this->orb_ = CORBA::ORB_init (argc, argv, 0, ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - int result = this->parse_args (argc, argv); - if (result != 0) - return result; - - // Get an Object reference to RootPOA. - CORBA::Object_var obj = - this->orb_->resolve_initial_references ("RootPOA", ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - // Narrow the Object reference to a POA reference - this->root_poa_ = - PortableServer::POA::_narrow (obj.in (), ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - // Get the POAManager of RootPOA - this->poa_manager_ = - this->root_poa_->the_POAManager (ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - // Activate the diamond servant and its base classes under RootPOA. - PortableServer::ObjectId_var id = - this->root_poa_->activate_object (&this->top_servant_, - ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - -// // We only care about the most derived class here. -// this->diamond_obj_ = this->diamond_servant_._this (ACE_TRY_ENV); -// ACE_CHECK_RETURN (-1); - - id = - this->root_poa_->activate_object (&this->diamond_servant_, - ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - // We only care about the most derived class here. - this->diamond_obj_ = this->root_poa_->id_to_reference (id.in (), - ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - id = - this->root_poa_->activate_object (&this->left_servant_, - ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - id = - this->root_poa_->activate_object (&this->right_servant_, - ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - CORBA::String_var str = - this->orb_->object_to_string (this->diamond_obj_.in (), - ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - ACE_DEBUG ((LM_DEBUG, "Diamond Servant activated:\n %s\n", - str.in())); - - return 0; - - -} - -int -Collocation_Test::parse_args (int /*argc*/, - char *[] /*argv*/) -{ - return 0; -} - -int -Collocation_Test::test_narrow (CORBA::Environment &ACE_TRY_ENV) -{ - Diamond::Top_var top = - Diamond::Top::_narrow (this->diamond_obj_.in (), ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - Diamond::Left_var left = - Diamond::Left::_narrow (this->diamond_obj_.in (), ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - Diamond::Right_var right = - Diamond::Right::_narrow (this->diamond_obj_.in (), ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - Diamond::Buttom_var buttom = - Diamond::Buttom::_narrow (this->diamond_obj_.in (), ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - CORBA::String_var str = top->shape (ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - ACE_DEBUG ((LM_DEBUG, "Calling top->shape: %s\n", str.in ())); - - str = left->shape (ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - ACE_DEBUG ((LM_DEBUG, "Calling left->shape: %s\n", str.in ())); - - str = right->shape (ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - ACE_DEBUG ((LM_DEBUG, "Calling right->shape: %s\n", str.in ())); - - str = buttom->shape (ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - ACE_DEBUG ((LM_DEBUG, "Calling buttom->shape: %s\n", str.in ())); - - return 0; -} - -int -Collocation_Test::run (CORBA::Environment &ACE_TRY_ENV) -{ - this->poa_manager_->activate (ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - this->test_narrow (ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - return 0; -} diff --git a/TAO/tests/Collocation/Collocation_Tester.h b/TAO/tests/Collocation/Collocation_Tester.h deleted file mode 100644 index 584710a098a..00000000000 --- a/TAO/tests/Collocation/Collocation_Tester.h +++ /dev/null @@ -1,64 +0,0 @@ -// $Id$ - -//============================================================================ -// -// = FILENAME -// Collocation_Test.h -// -// = DESCRIPTION -// Server class to perform testing of TAO's collocation mechanism. -// -// = AUTHOR -// Nanbor Wang -// -//============================================================================= - -#if !defined (TAO_COLLOCATION_TEST_H) -#define TAO_COLLOCATION_TEST_H - -#include "Diamond_i.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - - - -class Collocation_Test -{ -public: - Collocation_Test (void); - - void shutdown (CORBA::Environment &ACE_TRY_ENV); - - int init (int argc, char *argv[], CORBA::Environment &); - // Initializing the Collocation_Test object. - - int parse_args (int argc, char *argv[]); - // Parse the test specific arguments. - - int test_narrow (CORBA::Environment &); - // This test narrow an object reference to its base class and see - // if it works correctly. - - int run (CORBA::Environment &); - // Run the test. - -private: - CORBA::ORB_var orb_; - - PortableServer::POA_var root_poa_; - - PortableServer::POAManager_var poa_manager_; - - CORBA::Object_var diamond_obj_; - // Our basic test object. - - Top_i top_servant_; - Left_i left_servant_; - Right_i right_servant_; - Buttom_i diamond_servant_; - // A collection of servant for basic narrowing test. -}; - -#endif /* TAO_COLLOCATION_TEST_H */ |