Skip to content

Commit daa794e

Browse files
committed
Minor test changes and add new test to the test list as not fixed
* TAO/bin/tao_orb_tests.lst: * TAO/tests/GIOP_Fragments/Big_String_Sequence/Big_String_Sequence.mpc: * TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo.idl: * TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo_i.cpp: * TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo_i.h: * TAO/tests/GIOP_Fragments/Big_String_Sequence/client.cpp: * TAO/tests/GIOP_Fragments/Big_String_Sequence/server.cpp:
1 parent 7894e00 commit daa794e

7 files changed

Lines changed: 21 additions & 35 deletions

File tree

TAO/bin/tao_orb_tests.lst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,7 @@ TAO/tests/Native_Exceptions/run_test.pl:
433433
TAO/tests/Servant_To_Reference_Test/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST
434434
TAO/tests/Sequence_Unit_Tests/run_test.pl:
435435
TAO/tests/Typedef_String_Array/run_test.pl:
436+
TAO/tests/GIOP_Fragments/Big_String_Sequence/run_test.pl: !FIXED_BUGS_ONLY
436437
TAO/tests/GIOP_Fragments/PMB_With_Fragments/run_test.pl: !CORBA_E_MICRO
437438
TAO/tests/CodeSets/simple/run_test.pl: !GIOP10 !STATIC
438439
TAO/tests/Hang_Shutdown/run_test.pl: !ST !ACE_FOR_TAO

TAO/tests/GIOP_Fragments/Big_String_Sequence/Big_String_Sequence.mpc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ project(*Server): taoserver {
2121

2222
project(*Client): taoclient {
2323
exename = client
24-
after += *IDL
24+
after += *idl
2525
Source_Files {
2626
client.cpp
2727
EchoC.cpp
Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
/* -*- C++ -*- */
2-
#if !defined (_ECHO_IDL)
3-
#define _ECHO_IDL
4-
51
interface Echo
62
{
7-
// = TITLE
83
// Defines an interface that encapsulates an operation that returns
94
// a string sequence, or a wstring sequence, respectively.
105

@@ -16,5 +11,3 @@ interface Echo
1611

1712
oneway void shutdown ();
1813
};
19-
20-
#endif /* _ECHO_IDL */

TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo_i.cpp

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "Echo_i.h"
22

3-
enum { BIG_LENGTH = 4 * 1024 };
3+
constexpr size_t BIG_LENGTH = 4 * 1024;
44

55
// Constructor.
66

@@ -9,37 +9,29 @@ Echo_i::Echo_i (CORBA::ORB_ptr o)
99
{
1010
}
1111

12-
// Destructor.
13-
14-
Echo_i::~Echo_i ()
15-
{
16-
}
17-
1812
// Return a list of strings.
19-
2013
Echo::List *
2114
Echo_i::return_list ()
2215
{
2316
Echo::List_var list;
2417

2518
{
26-
Echo::List *tmp = 0;
19+
Echo::List *tmp {};
2720
ACE_NEW_RETURN (tmp,
2821
Echo::List (2),
29-
0);
22+
{});
3023
list = tmp;
3124
}
3225

3326
list->length (2);
3427

3528
// Just do something to get a 'big' list of strings.
3629
CORBA::Char big[BIG_LENGTH + 1];
37-
for (int i = 0; i < BIG_LENGTH; ++i)
30+
for (size_t i = 0; i < BIG_LENGTH; ++i)
3831
big[i] = 'A';
3932
big[BIG_LENGTH] = 0;
40-
CORBA::Char small[] = "Hello World";
4133
list[CORBA::ULong(0)] = CORBA::string_dup(big);
42-
list[CORBA::ULong(1)] = CORBA::string_dup(small);
34+
list[CORBA::ULong(1)] = CORBA::string_dup("Hello World");
4335

4436
return list._retn ();
4537
}
@@ -50,22 +42,22 @@ Echo_i::return_wlist ()
5042
Echo::WList_var list;
5143

5244
{
53-
Echo::WList *tmp = 0;
45+
Echo::WList *tmp {};
5446
ACE_NEW_RETURN (tmp,
5547
Echo::WList (2),
56-
0);
48+
{});
5749
list = tmp;
5850
}
5951

6052
list->length (2);
6153

6254
// Just do something to get a 'big' list of wide strings.
6355
CORBA::WChar big[BIG_LENGTH + 1];
64-
for (int i = 0; i < BIG_LENGTH; ++i)
56+
for (size_t i = 0; i < BIG_LENGTH; ++i)
6557
big[i] = 'A';
6658
big[BIG_LENGTH] = 0;
6759
CORBA::WChar small[17 + 1];
68-
for (int i = 0; i < 17; ++i)
60+
for (size_t i = 0; i < 17; ++i)
6961
small[i] = 'B';
7062
small[17] = 0;
7163
list[CORBA::ULong(0)] = CORBA::wstring_dup(big);
@@ -77,7 +69,7 @@ Echo_i::return_wlist ()
7769
// Shutdown the server application.
7870

7971
void
80-
Echo_i::shutdown (void)
72+
Echo_i::shutdown ()
8173
{
8274
ACE_DEBUG ((LM_DEBUG,
8375
ACE_TEXT ("\nThe echo server is shutting down\n")));

TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo_i.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,20 @@ class Echo_i : public POA_Echo
2828
Echo_i (CORBA::ORB_ptr o);
2929

3030
/// Destructor.
31-
virtual ~Echo_i (void);
31+
~Echo_i () override = default;
3232

3333
/// Return the result sequences to the cllient.
34-
virtual Echo::List *return_list ();
35-
virtual Echo::WList *return_wlist ();
34+
Echo::List *return_list () override;
35+
Echo::WList *return_wlist () override;
3636

3737
/// Shutdown the server.
38-
virtual void shutdown ();
38+
void shutdown () override;
3939

4040
private:
4141
/// ORB pointer.
4242
CORBA::ORB_var orb_;
4343

44-
void operator= (const Echo_i&);
44+
void operator= (const Echo_i&) = delete;
4545
};
4646

4747
#endif /* ECHO_I_H */

TAO/tests/GIOP_Fragments/Big_String_Sequence/client.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
6161
ACE_ERROR_RETURN ((LM_ERROR, "Expected length 2\n"), -1);
6262
}
6363
const char* value = (*list)[0].in();
64-
size_t length = strlen(value);
64+
size_t length = std::strlen(value);
6565
ACE_DEBUG ((LM_DEBUG,
6666
"First element has length %u\n",
6767
length));
@@ -75,9 +75,9 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
7575
}
7676
}
7777
value = (*list)[1].in();
78-
length = strlen(value);
78+
length = std::strlen(value);
7979
ACE_DEBUG ((LM_DEBUG,
80-
"Second element has length %u, value: %s\n",
80+
"Second element has length %u, value: <%C>\n",
8181
length, value));
8282
if (strcmp(value, "Hello World") != 0)
8383
{

TAO/tests/GIOP_Fragments/Big_String_Sequence/server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
8585

8686
ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
8787

88-
root_poa->destroy (1, 1);
88+
root_poa->destroy (true, true);
8989

9090
orb->destroy ();
9191
}

0 commit comments

Comments
 (0)