summaryrefslogtreecommitdiff
path: root/TAO/tests
diff options
context:
space:
mode:
authorJoachim Achtzehnter <joachima@netacquire.com>2020-09-11 18:53:25 -0700
committerJoachim Achtzehnter <joachima@netacquire.com>2020-09-11 18:53:25 -0700
commit259367ebea5fe5b875d42d0e431f0e7171a39aa5 (patch)
treeedc613f77fd9da710dce1df684eef8fb24b5f0d9 /TAO/tests
parent477f0dab0b7feee0bedd3afed629f5ed0937d7cd (diff)
downloadATCD-259367ebea5fe5b875d42d0e431f0e7171a39aa5.tar.gz
Removed use of std namespace (really?)
Diffstat (limited to 'TAO/tests')
-rw-r--r--TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo_i.cpp28
-rw-r--r--TAO/tests/GIOP_Fragments/Big_String_Sequence/client.cpp16
2 files changed, 32 insertions, 12 deletions
diff --git a/TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo_i.cpp b/TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo_i.cpp
index 0a1a818a548..bd1e6203b21 100644
--- a/TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo_i.cpp
+++ b/TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo_i.cpp
@@ -1,6 +1,7 @@
-#include <string>
#include "Echo_i.h"
+enum { BIG_LENGTH = 4 * 1024 };
+
// Constructor.
Echo_i::Echo_i (CORBA::ORB_ptr o)
@@ -32,10 +33,13 @@ Echo_i::return_list ()
list->length (2);
// Just do something to get a 'big' list of strings.
- std::string big(4 * 1024, 'A');
- std::string small("Hello World");
- list[CORBA::ULong(0)] = CORBA::string_dup(big.c_str());
- list[CORBA::ULong(1)] = CORBA::string_dup(small.c_str());
+ CORBA::Char big[BIG_LENGTH + 1];
+ for (int i = 0; i < BIG_LENGTH; ++i)
+ big[i] = 'A';
+ big[BIG_LENGTH] = 0;
+ CORBA::Char small[] = "Hello World";
+ list[CORBA::ULong(0)] = CORBA::string_dup(big);
+ list[CORBA::ULong(1)] = CORBA::string_dup(small);
return list._retn ();
}
@@ -56,10 +60,16 @@ Echo_i::return_wlist ()
list->length (2);
// Just do something to get a 'big' list of wide strings.
- std::wstring big(4 * 1024, 'A');
- std::wstring small(17, 'B');
- list[CORBA::ULong(0)] = CORBA::wstring_dup(big.c_str());
- list[CORBA::ULong(1)] = CORBA::wstring_dup(small.c_str());
+ CORBA::WChar big[BIG_LENGTH + 1];
+ for (int i = 0; i < BIG_LENGTH; ++i)
+ big[i] = 'A';
+ big[BIG_LENGTH] = 0;
+ CORBA::WChar small[17 + 1];
+ for (int i = 0; i < 17; ++i)
+ small[i] = 'B';
+ small[17] = 0;
+ list[CORBA::ULong(0)] = CORBA::wstring_dup(big);
+ list[CORBA::ULong(1)] = CORBA::wstring_dup(small);
return list._retn ();
}
diff --git a/TAO/tests/GIOP_Fragments/Big_String_Sequence/client.cpp b/TAO/tests/GIOP_Fragments/Big_String_Sequence/client.cpp
index d78b56841e6..6cbd0fe6b65 100644
--- a/TAO/tests/GIOP_Fragments/Big_String_Sequence/client.cpp
+++ b/TAO/tests/GIOP_Fragments/Big_String_Sequence/client.cpp
@@ -61,7 +61,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
ACE_ERROR_RETURN ((LM_ERROR, "Expected length 2\n"), -1);
}
const char* value = (*list)[0].in();
- size_t length = std::strlen(value);
+ size_t length = strlen(value);
ACE_DEBUG ((LM_DEBUG,
"First element has length %u\n",
length));
@@ -75,15 +75,25 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
}
}
value = (*list)[1].in();
- length = std::strlen(value);
+ length = strlen(value);
ACE_DEBUG ((LM_DEBUG,
"Second element has length %u, value: %s\n",
length, value));
- if (std::strcmp(value, "Hello World") != 0)
+ if (strcmp(value, "Hello World") != 0)
{
ACE_ERROR_RETURN ((LM_ERROR, "Expected \"Hello World\""), -1);
}
+ Echo::WList_var wlist = echo->return_wlist();
+
+ ACE_DEBUG ((LM_DEBUG,
+ "Received wide list of length %u\n",
+ wlist->length()));
+ if (wlist->length() != 2)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR, "Expected length 2\n"), -1);
+ }
+
echo->shutdown ();
orb->destroy ();
}