Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tests / Bug_2201_Regression / test.cpp
blobf2b6a27116cbc3db5cbb475ca6e77e2839fe7f8e
1 #include "ace/Log_Msg.h"
2 #include "TestDataC.h"
4 int
5 ACE_TMAIN(int argc, ACE_TCHAR *argv[])
7 int retval = 0;
9 CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
11 SeqTest::NodeSeq ns;
12 ns.length (1);
13 ns[0].ls.length (1);
14 ns[0].ls[0] = 42;
16 ns.length (0); // Shrink sequence
17 ns.length (1); // Re-grow sequence; should re-initialize meber sequence
18 // "as if" default constructed. I.e., the "ls" member
19 // should have a length of zero.
21 if (ns[0].ls.length() == 0) {
22 ACE_DEBUG ((LM_DEBUG, "Test passed\n"));
24 else {
25 ACE_ERROR ((LM_ERROR, "Test failed\n"));
26 retval = 1;
29 orb->destroy ();
31 return retval;