summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-12-08 00:19:28 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-12-08 00:19:28 +0000
commit226b5e6f4bbab7ad04af93578b8acc498ca065e5 (patch)
tree47323e05dda5e3e2872e58e2a17d96679b1ece32 /TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test
parentf7b726055d41d7730e80595f7072bafc3ee10595 (diff)
downloadATCD-226b5e6f4bbab7ad04af93578b8acc498ca065e5.tar.gz
ChangeLogTag: Tue Dec 7 18:16:14 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
Diffstat (limited to 'TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test')
-rw-r--r--TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/client.cpp6
-rw-r--r--TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/idl3_client.cpp68
-rwxr-xr-xTAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/run_test.pl3
-rw-r--r--TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/test.idl15
4 files changed, 45 insertions, 47 deletions
diff --git a/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/client.cpp b/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/client.cpp
index 9233999a0e6..410ad1fd4f3 100644
--- a/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/client.cpp
+++ b/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/client.cpp
@@ -26,12 +26,6 @@ main (int argc, char *argv[])
int status = client.run (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- const char *result_string = status ? "test failed" : "test ok";
-
- ACE_DEBUG ((LM_DEBUG,
- "%s\n",
- result_string));
-
if (status == -1)
{
return 1;
diff --git a/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/idl3_client.cpp b/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/idl3_client.cpp
index 10187bcdc7b..c291082e7a4 100644
--- a/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/idl3_client.cpp
+++ b/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/idl3_client.cpp
@@ -822,8 +822,39 @@ IDL3_Client::component_inheritance_test (
ACE_ENV_ARG_DECL
)
{
+ CORBA::ComponentIR::ComponentDef_var comp_base =
+ comp_def->base_component (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (-1);
+
+ if (CORBA::is_nil (comp_base.in ()))
+ {
+ if (this->debug_)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "component_inheritance_test: "
+ "base component is null\n"));
+ }
+
+ return -1;
+ }
+
+ CORBA::String_var str = comp_base->id (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (-1);
+
+ if (str.in () == 0 || ACE_OS::strcmp (str.in (), COMP_BASE_ID) != 0)
+ {
+ if (this->debug_)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "component_inheritance_test: "
+ "bad id on base component\n"));
+ }
+
+ return -1;
+ }
+
CORBA::InterfaceDefSeq_var supported =
- comp_def->supported_interfaces (ACE_ENV_SINGLE_ARG_PARAMETER);
+ comp_base->supported_interfaces (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
CORBA::ULong length = supported->length ();
@@ -840,8 +871,6 @@ IDL3_Client::component_inheritance_test (
return -1;
}
- CORBA::String_var str;
-
for (CORBA::ULong i = 0; i < length; ++i)
{
str = supported[i].in ()->id (ACE_ENV_SINGLE_ARG_PARAMETER);
@@ -862,37 +891,6 @@ IDL3_Client::component_inheritance_test (
}
}
- CORBA::ComponentIR::ComponentDef_var comp_base =
- comp_def->base_component (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (CORBA::is_nil (comp_base.in ()))
- {
- if (this->debug_)
- {
- ACE_DEBUG ((LM_DEBUG,
- "component_inheritance_test: "
- "base component is null\n"));
- }
-
- return -1;
- }
-
- str = comp_base->id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (str.in () == 0 || ACE_OS::strcmp (str.in (), COMP_BASE_ID) != 0)
- {
- if (this->debug_)
- {
- ACE_DEBUG ((LM_DEBUG,
- "component_inheritance_test: "
- "bad id on base component\n"));
- }
-
- return -1;
- }
-
return 0;
}
@@ -1657,7 +1655,7 @@ IDL3_Client::home_inheritance_test (CORBA::ComponentIR::HomeDef_var &hd
}
CORBA::InterfaceDefSeq_var supported =
- hd->supported_interfaces (ACE_ENV_SINGLE_ARG_PARAMETER);
+ bhd->supported_interfaces (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
CORBA::ULong length = supported->length ();
diff --git a/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/run_test.pl b/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/run_test.pl
index 9f1c56c3e03..80fb6ba003c 100755
--- a/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/run_test.pl
+++ b/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/run_test.pl
@@ -12,6 +12,7 @@ $status = 0;
$ifr_iorfile= "if_repo.ior";
$test_idl = PerlACE::LocalFile ("test.idl");
+$includes = "-I ../../../.. -I../../../../CIAO/ciao -I../../../../orbsvcs";
# find the tao_ifr executable.
# Its placement is dependent upon the OS and if MPC generated makefiles are used.
@@ -53,7 +54,7 @@ if (PerlACE::waitforfile_timed ($ifr_iorfile, 15) == -1) {
exit 1;
}
-$TAO_IFR->Arguments ("-ORBInitRef InterfaceRepository=file://$ifr_iorfile $test_idl");
+$TAO_IFR->Arguments ("-ORBInitRef InterfaceRepository=file://$ifr_iorfile $includes $test_idl");
$tresult = $TAO_IFR->SpawnWaitKill (30);
diff --git a/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/test.idl b/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/test.idl
index be9a95c554d..d24e4b5bd13 100644
--- a/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/test.idl
+++ b/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/test.idl
@@ -1,6 +1,11 @@
// -*- C++ -*-
// $Id$
+#ifndef INTERFACEREPO_IDL3_TEST
+#define INTERFACEREPO_IDL3_TEST
+
+#include <Components.idl>
+
module help
{
exception doh {};
@@ -11,15 +16,15 @@ module help
{
interface c_supp1 {};
interface c_supp2 {};
- component c_base {};
+ component c_base supports c_supp1, c_supp2 {};
valuetype v_base_base {};
valuetype v_base : v_base_base {};
interface v_supp1 {};
abstract interface v_supp2 {};
- home h_base manages c_base {};
valuetype h_key {};
interface h_supp1 {};
interface h_supp2 {};
+ home h_base supports h_supp1, h_supp2 manages c_base {};
};
module help
@@ -34,8 +39,7 @@ module help
module mod
{
- component test_component
- : help::c_base supports help::c_supp1, help::c_supp2
+ component test_component : help::c_base
{
attribute long c_attr1
getraises (help::doh)
@@ -75,7 +79,7 @@ module mod
raises (help::whups, help::doh);
};
- home test_home : help::h_base supports help::h_supp1, help::h_supp2
+ home test_home : help::h_base
manages test_component primarykey help::h_key
{
factory create_tc (in string set_uid)
@@ -110,4 +114,5 @@ module mod
};
+#endif /* INTERFACEREPO_IDL3_TEST */