diff options
author | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-22 09:27:02 +0000 |
---|---|---|
committer | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-22 09:27:02 +0000 |
commit | adda4831a9d5e976668618d957d78951de47fc16 (patch) | |
tree | 42f07e6fa798c99d45dc3e832f68edb4545796a2 /TAO/orbsvcs | |
parent | 995ac88a15faa1096417ea05dd5a176647f02696 (diff) | |
download | ATCD-adda4831a9d5e976668618d957d78951de47fc16.tar.gz |
Old test does not work with the new Repository.
Diffstat (limited to 'TAO/orbsvcs')
-rw-r--r-- | TAO/orbsvcs/tests/ImplRepo/Repository_Test.cpp | 166 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/ImplRepo/Repository_Test.dsp | 116 |
2 files changed, 0 insertions, 282 deletions
diff --git a/TAO/orbsvcs/tests/ImplRepo/Repository_Test.cpp b/TAO/orbsvcs/tests/ImplRepo/Repository_Test.cpp deleted file mode 100644 index ecf7ec436e8..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/Repository_Test.cpp +++ /dev/null @@ -1,166 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#include "../../ImplRepo_Service/Repository.h" - -ASYS_TCHAR *NAME_VALUE = ASYS_TEXT ("server"); -ASYS_TCHAR *NAME_VALUE2 = ASYS_TEXT ("server"); -ASYS_TCHAR *COMM_LINE_VALUE = ASYS_TEXT ("server -i"); -ASYS_TCHAR *ENV_VALUE = ASYS_TEXT ("null environment"); -ASYS_TCHAR *HOST_VALUE = ASYS_TEXT ("maxixe.cs.wustl.edu"); -const int PORT_VALUE = 20000; -ASYS_TCHAR *PING_IOR_VALUE = ASYS_TEXT ("iiop://maxixe/ping"); -ASYS_TCHAR *WDIR_VALUE = ASYS_TEXT ("."); - -// Just tests the functionality of the Repository - -int main (int argc, char *argv[]) -{ - int test_success = 1; - Repository rep; - Repository_Record new_rec, rec; - - new_rec.comm_line = ACE::strnew (COMM_LINE_VALUE); - new_rec.env = ACE::strnew (ENV_VALUE); - new_rec.host = ACE::strnew (HOST_VALUE); - new_rec.port = PORT_VALUE; - new_rec.ping_ior = ACE::strnew (PING_IOR_VALUE); - new_rec.wdir = ACE::strnew (WDIR_VALUE); - - ACE_DEBUG ((LM_DEBUG, "=Adding Record to Repository\n")); - - // Add our one record - int result = rep.add (NAME_VALUE, new_rec); - - if (result == 1) // We need to get rid of it - { - ACE_DEBUG ((LM_DEBUG, "New Record already registered, updating\n")); - rep.update (NAME_VALUE, new_rec); - } - - ACE_DEBUG ((LM_DEBUG, "=Performing Resolve Test\n")); - - // Bring it back! - if (rep.resolve (NAME_VALUE, rec) == 0) - { - if (ACE_OS::strcmp (rec.comm_line, COMM_LINE_VALUE) != 0) - { - ACE_DEBUG ((LM_DEBUG, - "Error: comm_line compare failed: \"%s\" \"%s\"\n", - rec.comm_line, - COMM_LINE_VALUE)); - test_success = 0; - } - - if (ACE_OS::strcmp (rec.env, ENV_VALUE) != 0) - { - ACE_DEBUG ((LM_DEBUG, - "Error: env compare failed: \"%s\" \"%s\"\n", - rec.env, - ENV_VALUE)); - test_success = 0; - } - - if (ACE_OS::strcmp (rec.wdir, WDIR_VALUE) != 0) - { - ACE_DEBUG ((LM_DEBUG, - "Error: wdir compare failed: \"%s\" \"%s\"\n", - rec.wdir, - WDIR_VALUE)); - test_success = 0; - } - - if (ACE_OS::strcmp (rec.host, HOST_VALUE) != 0) - { - ACE_DEBUG ((LM_DEBUG, - "Error: host compare failed: \"%s\" \"%s\"\n", - rec.host, - HOST_VALUE)); - test_success = 0; - } - - if (rec.port != PORT_VALUE) - { - ACE_DEBUG ((LM_DEBUG, - "Error: port compare failed: \"%hu\" \"%hu\"\n", - rec.port, - PORT_VALUE)); - test_success = 0; - } - - if (ACE_OS::strcmp (rec.ping_ior, PING_IOR_VALUE) != 0) - { - ACE_DEBUG ((LM_DEBUG, - "Error: ping_ior compare failed: \"%s\" \"%s\"\n", - rec.ping_ior, - PING_IOR_VALUE)); - test_success = 0; - } - } - - // Try some of the single accessors - - ASYS_TCHAR *cl, *env, *ping_ior; - - ACE_DEBUG ((LM_DEBUG, "=Performing Single Accessor Test\n")); - - if (rep.get_comm_line (NAME_VALUE, cl) == 0 - && rep.get_env (NAME_VALUE, env) == 0 - && rep.get_ping_ior (NAME_VALUE, ping_ior) == 0) - { - if (ACE_OS::strcmp (cl, COMM_LINE_VALUE) != 0) - { - ACE_DEBUG ((LM_DEBUG, - "Error: comm_line compare failed: \"%s\" \"%s\"\n", - cl, - COMM_LINE_VALUE)); - test_success = 0; - } - - if (ACE_OS::strcmp (env, ENV_VALUE) != 0) - { - ACE_DEBUG ((LM_DEBUG, - "Error: env compare failed: \"%s\" \"%s\"\n", - env, - ENV_VALUE)); - test_success = 0; - } - - if (ACE_OS::strcmp (ping_ior, PING_IOR_VALUE) != 0) - { - ACE_DEBUG ((LM_DEBUG, - "Error: ping_ior compare failed: \"%s\" \"%s\"\n", - ping_ior, - PING_IOR_VALUE)); - test_success = 0; - } - - delete [] cl; - delete [] env; - delete [] ping_ior; - } - - ACE_DEBUG ((LM_DEBUG, "=Performing Reregister Test\n")); - - if (rep.add (NAME_VALUE, new_rec) != 1) - { - ACE_DEBUG ((LM_DEBUG, "Error: Reregistration not detected\n")); - test_success = 0; - } - - ACE_DEBUG ((LM_DEBUG, "=Cleaning up\n")); - - if (rep.remove (NAME_VALUE) != 0) - { - ACE_DEBUG ((LM_DEBUG, "Error: Could not remove record\n")); - test_success = 0; - } - - if (test_success == 0) - { - ACE_DEBUG ((LM_DEBUG, "Tests were successful\n")); - return 0; - } - else - return -1; -} diff --git a/TAO/orbsvcs/tests/ImplRepo/Repository_Test.dsp b/TAO/orbsvcs/tests/ImplRepo/Repository_Test.dsp deleted file mode 100644 index c0db7558226..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/Repository_Test.dsp +++ /dev/null @@ -1,116 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Repository_Test" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=Repository_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 "Repository_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 "Repository_Test.mak" CFG="Repository_Test - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Repository_Test - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "Repository_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)" == "Repository_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 "Release"
-# 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 "..\..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
-# SUBTRACT CPP /YX
-# 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 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 /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\..\ace"
-
-!ELSEIF "$(CFG)" == "Repository_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 "..\..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
-# SUBTRACT CPP /YX
-# 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 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\ace"
-
-!ENDIF
-
-# Begin Target
-
-# Name "Repository_Test - Win32 Release"
-# Name "Repository_Test - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\ImplRepo_Service\Options.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\ImplRepo_Service\Repository.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Repository_Test.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\ImplRepo_Service\Options.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\ImplRepo_Service\Repository.h
-# End Source File
-# End Group
-# End Target
-# End Project
|