diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-05-08 00:07:57 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-05-08 00:07:57 +0000 |
commit | b53570762438918c3e10bb0e48169d258c582c52 (patch) | |
tree | 612add95ad7d6ec12875f6abf0eb6c6c10a6ab2e /TAO/orbsvcs | |
parent | 75eedb09fa6306c27d722e68921ac3d2043bfb7a (diff) | |
download | ATCD-b53570762438918c3e10bb0e48169d258c582c52.tar.gz |
*** empty log message ***
Diffstat (limited to 'TAO/orbsvcs')
-rw-r--r-- | TAO/orbsvcs/tests/Naming/README | 19 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Naming/ns_tree.cpp | 30 |
2 files changed, 25 insertions, 24 deletions
diff --git a/TAO/orbsvcs/tests/Naming/README b/TAO/orbsvcs/tests/Naming/README index 35a1cb362c2..4f02780c57e 100644 --- a/TAO/orbsvcs/tests/Naming/README +++ b/TAO/orbsvcs/tests/Naming/README @@ -1,13 +1,16 @@ +// $Id$ -Currently the test app is compiled to: +The ns_tree.cpp test application exercises various features of TAO's +Naming Service. It behaves as follows: - - binds a new context ("MyContext"). - - binds the compound name ("MyContext;MyName") into the - root context. - - resolves the compount name ("MyContext;MyName"). + 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"). -(Functioning of hierarchical test implies functioning of the flat case) +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. +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 index e14f06c2070..303bebb9df6 100644 --- a/TAO/orbsvcs/tests/Naming/ns_tree.cpp +++ b/TAO/orbsvcs/tests/Naming/ns_tree.cpp @@ -10,7 +10,6 @@ // = AUTHOR // Ross Lillie <lillie@rsch.comm.mot.com> // LMPS Systems Research Lab -// // // ============================================================================ @@ -40,23 +39,23 @@ main (int argc, char **argv) if (orbmgr.init_child_poa (argc, argv,"Rob", TAO_TRY_ENV) == -1) ACE_ERROR_RETURN ((LM_ERROR, "failed to init ORB\n"), - -1); + -1); TAO_CHECK_ENV; - PortableServer::POA_var child_poa; - CORBA::ORB_var orb = orbmgr.orb (); + PortableServer::POA_var child_poa; + CORBA::ORB_var orb = orbmgr.orb (); - child_poa = orbmgr.child_poa (); - result = my_name_server.init (orb, child_poa); + child_poa = orbmgr.child_poa (); + result = my_name_server.init (orb, child_poa); - if (result < 0) - return result; + 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); + 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); @@ -65,20 +64,19 @@ main (int argc, char **argv) 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); + 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 + // Bind an object to a child context. CosNaming::Name test_name (2); test_name.length (2); test_name[0].id = CORBA::string_dup ("MyContext"); |