Merge pull request #2222 from jwillemsen/jwi-dllexportwarning
[ACE_TAO.git] / TAO / tests / Bug_4082_Regression / Bug_4082_Regression.cpp
blob6a5cacc26540ca0a6594479700e56567853a7a2e
1 #include "Bug_4082_RegressionC.h"
2 #include "tao/AnyTypeCode/TypeCode.h"
3 #include "tao/AnyTypeCode/Any.h"
5 int ACE_TMAIN (int, ACE_TCHAR *[])
7 MyLongSeq mls (2);
8 mls.length (2);
9 mls[0] = 0;
10 mls[1] = 1;
11 CORBA::Any a;
12 a <<= mls;
14 CORBA::TypeCode_var tc = a.type ();
15 if (!tc->equivalent (CORBA::_tc_LongSeq) || tc->equal (CORBA::_tc_LongSeq))
17 ACE_DEBUG ((LM_ERROR, ACE_TEXT ("ERROR: Test precondition not met\n")));
18 return 1;
21 const CORBA::LongSeq *cls = 0;
22 if (!(a >>= cls))
24 ACE_DEBUG ((LM_ERROR, ACE_TEXT ("ERROR: Failed to extract\n")));
25 return 1;
28 if (!cls || cls->length () != 2 || (*cls)[0] != 0 || (*cls)[1] != 1)
30 ACE_DEBUG ((LM_ERROR, ACE_TEXT ("ERROR: Extract invalid data\n")));
31 return 1;
34 return 0;