diff options
Diffstat (limited to 'TAO/orbsvcs/tests/Naming')
-rwxr-xr-x | TAO/orbsvcs/tests/Naming/Makefile | 51 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Naming/README | 16 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Naming/ns_tree.cpp | 114 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Naming/test_object.idl | 7 |
4 files changed, 0 insertions, 188 deletions
diff --git a/TAO/orbsvcs/tests/Naming/Makefile b/TAO/orbsvcs/tests/Naming/Makefile deleted file mode 100755 index 1392aebabdf..00000000000 --- a/TAO/orbsvcs/tests/Naming/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -# $Id$ -# -# Skeletal Makefile showing necessary compiler and loader flags needed -# to compile an ACE/TAO application. - -CXX = CC -g -IDL = $(TAO_ROOT)/TAO_IDL/tao_idl - -CPPFLAGS = -c -I$(ACE_ROOT) -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs -I. -IDLFLAGS = - -# All ACE/TAO related libraries have links in the $ACE_ROOT/ace -# directory. Alternately, you may define your LD_LIBRARY_PATH -# environment variable to search this directory. -LDFLAGS = -L$(ACE_ROOT)/ace - -# This is the *minimum* set of libraries required to link against the -# ACE/TAO ORB. Note that this does *not* include any of the CORBA -# services libraries. -LDLIBS = -lTAO -lACE -lorbsvcs -lsocket -ldl -lnsl -lgen - -# ACE and TAO are built (by default) on the SUN platform *without* -# exception handling support, and with multiprocessing support. Thus -# the following compiler flags are required. (-pta cause complete -# template class instantiation). -CFLAGS = -mt -pta -noex -DCFLAGS = -g - -# Define the additional directives for IDL stub code support. -.SUFFIXES : S.h C.h S.i C.i S.cpp C.cpp - -%S.h %C.h %S.i %C.i %S.cpp %C.cpp : %.idl - $(IDL) $(IDLFLAGS) $? - -%.o : %.cpp - $(CXX) $(DCFLAGS) $(CFLAGS) $(CPPFLAGS) $< - -% : %.o - $(CXX) $(DCFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS) - -# The rest of this file is application specific -SVROBJS = ns_tree.o test_objectS.o test_objectC.o - -all : ns_tree - -ns_tree : $(SVROBJS) - -ns_tree.o : ns_tree.cpp test_objectS.h Makefile - -clean : - -rm -rf *.o *C.cpp *S.cpp *C.h *C.i *S.h *S.i Templates.DB diff --git a/TAO/orbsvcs/tests/Naming/README b/TAO/orbsvcs/tests/Naming/README deleted file mode 100644 index 4f02780c57e..00000000000 --- a/TAO/orbsvcs/tests/Naming/README +++ /dev/null @@ -1,16 +0,0 @@ -// $Id$ - -The ns_tree.cpp test application exercises various features of TAO's -Naming Service. It behaves as follows: - - 1. It binds a new context ("MyContext"). - 2. It binds the compound name ("MyContext;MyName") into the - root context. - 3. It resolves the compount name ("MyContext;MyName"). - -In this case, proper functioning of the hierarchical test implies -functioning of the "flat" test. - -A collection of various tests selectable by command line arguments -will be available later. - diff --git a/TAO/orbsvcs/tests/Naming/ns_tree.cpp b/TAO/orbsvcs/tests/Naming/ns_tree.cpp deleted file mode 100644 index 303bebb9df6..00000000000 --- a/TAO/orbsvcs/tests/Naming/ns_tree.cpp +++ /dev/null @@ -1,114 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = FILENAME -// ns_tree.cpp -// -// = DESCRIPTION -// -// = AUTHOR -// Ross Lillie <lillie@rsch.comm.mot.com> -// LMPS Systems Research Lab -// -// ============================================================================ - -#include "tao/TAO.h" -#include "orbsvcs/CosNamingC.h" -#include "test_objectS.h" -#include "orbsvcs/Naming/Naming_Utils.h" - -class Test_Object_impl : public POA_Test_Object -{ -public: - Test_Object_impl (void) {}; - ~Test_Object_impl (void) {}; -}; - -int -main (int argc, char **argv) -{ - TAO_ORB_Manager orbmgr; - Test_Object_impl myObject; - TAO_Naming_Server my_name_server; - int result; - - TAO_TRY - { - // Initialize and obtain reference to the Naming Context - if (orbmgr.init_child_poa (argc, argv,"Rob", TAO_TRY_ENV) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "failed to init ORB\n"), - -1); - TAO_CHECK_ENV; - - PortableServer::POA_var child_poa; - CORBA::ORB_var orb = orbmgr.orb (); - - child_poa = orbmgr.child_poa (); - result = my_name_server.init (orb, child_poa); - - if (result < 0) - return result; - - CosNaming::Name context_name; - CosNaming::NamingContext_var ns_ctx; - context_name.length (1); - context_name[0].id = CORBA::string_dup ("NameService"); - ns_ctx = my_name_server->bind_new_context (context_name, TAO_TRY_ENV); - - TAO_CHECK_ENV_RETURN (TAO_TRY_ENV, -1); - - // Dummy object instantiation. - Test_Object_var myObject_var = - myObject._this (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Create a child context. - CosNaming::Name test_context (1); - CosNaming::NamingContext_var my_context; - test_context.length (1); - test_context[0].id = - CORBA::string_dup ("MyContext"); - my_context = my_name_server->bind_new_context (test_context, TAO_TRY_ENV); - - TAO_CHECK_ENV_RETURN (TAO_TRY_ENV, -1); - - cerr << "Created new context OK" << endl; - - // Bind an object to a child context. - CosNaming::Name test_name (2); - test_name.length (2); - test_name[0].id = CORBA::string_dup ("MyContext"); - test_name[1].id = CORBA::string_dup ("MyName"); - - my_name_server->bind (test_name, - myObject_var.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - cerr << "Bound compound name OK" << endl; - - // Finally, try now to resolve the compound name. - CosNaming::Name result_name (2); - result_name.length (2); - result_name[0].id = CORBA::string_dup ("MyContext"); - result_name[1].id = CORBA::string_dup ("MyName"); - - CORBA::Object_var resolvedobj = my_name_server->resolve (result_name, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - Test_Object_var resultObject = - Test_Object::_narrow (resolvedobj.in (), - TAO_TRY_ENV); - - cerr << "Resolved compound name OK" << endl; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("ns_tree"); - return -1; - } - TAO_ENDTRY; - return 0; -} diff --git a/TAO/orbsvcs/tests/Naming/test_object.idl b/TAO/orbsvcs/tests/Naming/test_object.idl deleted file mode 100644 index 42e5ee937bf..00000000000 --- a/TAO/orbsvcs/tests/Naming/test_object.idl +++ /dev/null @@ -1,7 +0,0 @@ -// $Id$ - -interface Test_Object -{ - // = TITLE - // This is a simple "no-op" interface to test the Naming Service. -}; |