summaryrefslogtreecommitdiff
path: root/TAO/tests/Bug_1639_Regression
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:11 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:11 +0000
commit6b846cf03c0bcbd8c276cb0af61a181e5f98eaae (patch)
treeda50d054f9c761c3f6a5923f6979e93306c56d68 /TAO/tests/Bug_1639_Regression
parent0e555b9150d38e3b3473ba325b56db2642e6352b (diff)
downloadATCD-6b846cf03c0bcbd8c276cb0af61a181e5f98eaae.tar.gz
Repo restructuring
Diffstat (limited to 'TAO/tests/Bug_1639_Regression')
-rw-r--r--TAO/tests/Bug_1639_Regression/.cvsignore1
-rwxr-xr-xTAO/tests/Bug_1639_Regression/run_test.pl26
-rw-r--r--TAO/tests/Bug_1639_Regression/struct.idl20
-rw-r--r--TAO/tests/Bug_1639_Regression/struct_client.cpp118
-rw-r--r--TAO/tests/Bug_1639_Regression/test.mpc16
5 files changed, 0 insertions, 181 deletions
diff --git a/TAO/tests/Bug_1639_Regression/.cvsignore b/TAO/tests/Bug_1639_Regression/.cvsignore
deleted file mode 100644
index b051c6c57fa..00000000000
--- a/TAO/tests/Bug_1639_Regression/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-client
diff --git a/TAO/tests/Bug_1639_Regression/run_test.pl b/TAO/tests/Bug_1639_Regression/run_test.pl
deleted file mode 100755
index 7c101f09272..00000000000
--- a/TAO/tests/Bug_1639_Regression/run_test.pl
+++ /dev/null
@@ -1,26 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib "../../../bin";
-use PerlACE::Run_Test;
-
-$status = 0;
-$type = "";
-
-print STDERR "\nDynamic Any struct and union alias tests\n";
-
-$CL = new PerlACE::Process ("client");
-
-$client = $CL->SpawnWaitKill (30);
-
-if ($client != 0)
-{
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-exit $status;
diff --git a/TAO/tests/Bug_1639_Regression/struct.idl b/TAO/tests/Bug_1639_Regression/struct.idl
deleted file mode 100644
index ab7ae27e229..00000000000
--- a/TAO/tests/Bug_1639_Regression/struct.idl
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// $Id$
-//
-module StructTest {
-
- struct MyStruct {
- octet MyOctet;
- unsigned long MyLong;
- };
-
- typedef MyStruct MyStructAlias;
-
- union MyUnion switch (boolean) {
- case TRUE :
- unsigned short MyShort;
- };
-
- typedef MyUnion MyUnionAlias;
-
-};
diff --git a/TAO/tests/Bug_1639_Regression/struct_client.cpp b/TAO/tests/Bug_1639_Regression/struct_client.cpp
deleted file mode 100644
index fe0cc437893..00000000000
--- a/TAO/tests/Bug_1639_Regression/struct_client.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-//
-// $Id$
-//
-#include "tao/AnyTypeCode/AnyTypeCode_methods.h"
-#include "tao/DynamicAny/DynAnyFactory.h"
-#include "structC.h"
-#include <ace/streams.h>
-
-using namespace StructTest;
-using namespace DynamicAny;
-
-//--------------------------------------------------------------------
-int main (int argc, char * argv[])
-//--------------------------------------------------------------------
-{
-
- // Generic catch handler
- try {
-
- // Initialize the ORB
- // ------------------
- CORBA::ORB_var orb; // _var, so we don't need/may not CORBA::release(orb)
- try {
- orb = CORBA::ORB_init (argc, argv);
- } catch (...) {
- cerr << "Cannot initialize ORB" << endl;
- throw;
- }
-
- // Get reference to the DynAny Factory
- CORBA::Object_var obj = orb->resolve_initial_references("DynAnyFactory");
-
- DynAnyFactory_var daf =
- DynAnyFactory::_narrow(obj.in());
-
- MyStruct my_struct;
- MyStructAlias my_struct_alias;
- MyUnion my_union;
- MyUnionAlias my_union_alias;
-
- CORBA::Any any_struct;
- CORBA::Any any_struct_alias;
- CORBA::Any any_union;
- CORBA::Any any_union_alias;
-
- // Write the structs and unions to anys so we can get the TypeCode info
- any_struct <<= my_struct;
- any_struct_alias <<= my_struct_alias;
- any_union <<= my_union;
- any_union_alias <<= my_union_alias;
-
- // Explicitly set the TypeCode for the aliased types because the any
- // doesn't take care of aliases
- any_struct_alias.type(_tc_MyStructAlias);
- any_union_alias.type(_tc_MyUnionAlias);
-
- CORBA::TypeCode_var tc_struct = any_struct.type();
- CORBA::TypeCode_var tc_struct_alias = any_struct_alias.type();
- CORBA::TypeCode_var tc_union = any_union.type();
- CORBA::TypeCode_var tc_union_alias = any_union_alias.type();
-
- cout << "Type Code of the struct: " << tc_struct->kind() << endl;
- cout << "Type Code of the struct alias: " << tc_struct_alias->kind() << endl;
- cout << "Type Code of the union: " << tc_union->kind() << endl;
- cout << "Type Code of the union alias: " << tc_union_alias->kind() << endl;
-
- // equal returns true only when the TypeCodes are exactly the same.
- if (tc_struct->equal(tc_struct_alias.in())) {
- cout << "Type Codes are identical" << endl;
- } else {
- cout << "Type Codes are different" << endl;
- }
- // equivalent returns true when the TypeCode is an alias
- if (tc_struct->equivalent(tc_struct_alias.in())) {
- cout << "Type Codes are equivalent" << endl;
- } else {
- cout << "Type Codes are not equivalent" << endl;
- }
-
- DynAny_var da_struct = daf->create_dyn_any_from_type_code (tc_struct.in());
-
- try {
- DynAny_var da_struct_alias = daf->create_dyn_any_from_type_code (tc_struct_alias.in());
- } catch ( const CORBA::UNKNOWN &) {
- cout << "CORBA::UNKNOWN exception when calling create_dyn_any_from_type_code (tc_struct_alias)" << endl;
- }
-
- try {
- DynAny_var da_struct_alias = daf->create_dyn_any (any_struct_alias);
- } catch ( const CORBA::UNKNOWN &) {
- cout << "CORBA::UNKNOWN exception when calling create_dyn_any (any_struct_alias)" << endl;
- }
-
- DynAny_var da_union = daf->create_dyn_any_from_type_code (tc_union.in());
-
- try {
- DynAny_var da_union_alias = daf->create_dyn_any_from_type_code (tc_union_alias.in());
- } catch ( const CORBA::UNKNOWN &) {
- cout << "CORBA::UNKNOWN exception when calling create_dyn_any_from_type_code (tc_union_alias)" << endl;
- }
-
- try {
- DynAny_var da_union_alias = daf->create_dyn_any (any_union_alias);
- } catch ( const CORBA::UNKNOWN &) {
- cout << "CORBA::UNKNOWN exception when calling create_dyn_any (any_union_alias)" << endl;
- }
-
- } // end try
-
- catch (const CORBA::Exception &) {
- cerr << "Caught CORBA exception" << endl;
- return 1;
- }
- catch (...) {
- return 1;
- }
- return 0;
-}
diff --git a/TAO/tests/Bug_1639_Regression/test.mpc b/TAO/tests/Bug_1639_Regression/test.mpc
deleted file mode 100644
index f0d95132c29..00000000000
--- a/TAO/tests/Bug_1639_Regression/test.mpc
+++ /dev/null
@@ -1,16 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project (Bug_1639_testclient) : taoserver, dynamicany, exceptions {
- exename = client
- Source_Files {
- struct_client.cpp
- structC.cpp
- structS.cpp
- }
-
- IDL_Files {
- struct.idl
- }
-
-}