summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>2001-03-05 14:46:09 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>2001-03-05 14:46:09 +0000
commit96f3f24e623254562e48ca08979b81680bdd040e (patch)
tree99cc9ae12e8687fd32c090b98b91b018a5c2c240 /tests
parent4dd886d75e2f0e11c60a7779a582ab7492341c23 (diff)
downloadATCD-96f3f24e623254562e48ca08979b81680bdd040e.tar.gz
ChangeLogTag:Mon Mar 5 07:52:52 2001 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
Diffstat (limited to 'tests')
-rw-r--r--tests/Dynamic_Priority_Test.cpp2
-rw-r--r--tests/RMCast/RMCast_Fragment_Test.cpp15
-rw-r--r--tests/RMCast/RMCast_Reassembly_Test.cpp25
-rw-r--r--tests/Thread_Pool_Test.cpp8
4 files changed, 25 insertions, 25 deletions
diff --git a/tests/Dynamic_Priority_Test.cpp b/tests/Dynamic_Priority_Test.cpp
index 5f6ea6e0961..eb9c1b3adea 100644
--- a/tests/Dynamic_Priority_Test.cpp
+++ b/tests/Dynamic_Priority_Test.cpp
@@ -411,7 +411,7 @@ performance_producer (void *args)
// Set a character in the current message block at its
// read pointer position, and adjust the write pointer.
- *mb->rd_ptr () = 'a';
+ *mb->wr_ptr () = 'a';
mb->wr_ptr (1);
// Enqueue the message block in priority order.
diff --git a/tests/RMCast/RMCast_Fragment_Test.cpp b/tests/RMCast/RMCast_Fragment_Test.cpp
index e180ff20908..390fc626dc0 100644
--- a/tests/RMCast/RMCast_Fragment_Test.cpp
+++ b/tests/RMCast/RMCast_Fragment_Test.cpp
@@ -205,9 +205,7 @@ ACE_RMCast_Fragment_Tester::initialize (ACE_Message_Block *mb)
{
char z = 0;
for (char *j = i->rd_ptr (); j != i->wr_ptr (); ++j)
- {
- *j = ++z;
- }
+ *j = ++z;
}
}
@@ -219,10 +217,10 @@ ACE_RMCast_Fragment_Tester::compare (ACE_Message_Block *mb)
for (const ACE_Message_Block *i = mb; i != 0; i = i->cont ())
{
- blob.copy (i->rd_ptr (), i->length ());
+ blob.copy (i->wr_ptr (), i->length ());
}
- if (ACE_OS::memcmp (blob.rd_ptr (),
+ if (ACE_OS::memcmp (blob.wr_ptr (),
this->received_.rd_ptr (),
n) != 0)
{
@@ -275,7 +273,7 @@ ACE_RMCast_Fragment_Tester::data (ACE_RMCast::Data &data)
size_t fragment_size = payload_size;
if (payload_size > 0)
{
- ACE_OS::memcpy (this->received_.rd_ptr () + offset,
+ ACE_OS::memcpy (this->received_.wr_ptr () + offset,
mb->rd_ptr (),
payload_size);
this->received_bytes_ += payload_size;
@@ -288,8 +286,9 @@ ACE_RMCast_Fragment_Tester::data (ACE_RMCast::Data &data)
// ACE_DEBUG ((LM_DEBUG,
// "offset = %d , payload = %d\n", offset, payload_size));
fragment_size += payload_size;
- ACE_OS::memcpy (this->received_.rd_ptr () + offset,
- i->rd_ptr (), payload_size);
+ ACE_OS::memcpy (this->received_.wr_ptr () + offset,
+ i->rd_ptr (),
+ payload_size);
this->received_bytes_ += payload_size;
offset += payload_size;
}
diff --git a/tests/RMCast/RMCast_Reassembly_Test.cpp b/tests/RMCast/RMCast_Reassembly_Test.cpp
index dba5bffa34a..27f2aff7fa0 100644
--- a/tests/RMCast/RMCast_Reassembly_Test.cpp
+++ b/tests/RMCast/RMCast_Reassembly_Test.cpp
@@ -101,7 +101,7 @@ ACE_RMCast_Reassembly_Tester::svc (void)
// Use an ACT to store the results in <received>
ACE_Message_Block *received_pointer = &received;
- ACE_OS::memcpy (big_blob.rd_ptr (),
+ ACE_OS::memcpy (big_blob.wr_ptr (),
&received_pointer,
sizeof(received_pointer));
@@ -142,7 +142,7 @@ ACE_RMCast_Reassembly_Tester::svc (void)
// Use an ACT to store the results in <received>
ACE_Message_Block *received_pointer = &received;
- ACE_OS::memcpy (big_blob.rd_ptr (),
+ ACE_OS::memcpy (big_blob.wr_ptr (),
&received_pointer,
sizeof(received_pointer));
@@ -200,10 +200,9 @@ ACE_RMCast_Reassembly_Tester::initialize (ACE_Message_Block *mb)
for (ACE_Message_Block *i = mb; i != 0; i = i->cont ())
{
char z = 0;
+
for (char *j = i->rd_ptr (); j != i->wr_ptr (); ++j)
- {
- *j = ++z;
- }
+ *j = ++z;
}
}
@@ -215,14 +214,14 @@ ACE_RMCast_Reassembly_Tester::compare (ACE_Message_Block *received,
ACE_Message_Block blob (n);
for (const ACE_Message_Block *i = original; i != 0; i = i->cont ())
- {
- blob.copy (i->rd_ptr (), i->length ());
- }
+ blob.copy (i->wr_ptr (), i->length ());
if (received->rd_ptr () == 0)
- ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT ("INCOMPLETE MESSAGE\n")), -1);
+ ACE_ERROR_RETURN ((LM_DEBUG,
+ ACE_TEXT ("INCOMPLETE MESSAGE\n")),
+ -1);
- if (ACE_OS::memcmp (blob.rd_ptr (),
+ if (ACE_OS::memcmp (blob.wr_ptr (),
received->rd_ptr (),
n) != 0)
{
@@ -257,12 +256,14 @@ ACE_RMCast_Reassembly_Tester::data (ACE_RMCast::Data &data)
ACE_Message_Block *mb = data.payload;
ACE_Message_Block *pointer;
- ACE_OS::memcpy (&pointer, mb->rd_ptr (), sizeof(pointer));
+ ACE_OS::memcpy (&pointer,
+ mb->wr_ptr (),
+ sizeof (pointer));
size_t l = mb->length ();
pointer->size (l);
pointer->wr_ptr (pointer->rd_ptr () + l);
- ACE_OS::memcpy (pointer->rd_ptr (), mb->rd_ptr (), l);
+ ACE_OS::memcpy (pointer->wr_ptr (), mb->rd_ptr (), l);
return 0;
}
diff --git a/tests/Thread_Pool_Test.cpp b/tests/Thread_Pool_Test.cpp
index 0efeb6137dc..e8a6decd8e8 100644
--- a/tests/Thread_Pool_Test.cpp
+++ b/tests/Thread_Pool_Test.cpp
@@ -222,14 +222,14 @@ Thread_Pool::test_queue_deactivation_shutdown (void)
ACE_TEXT ("(%t) enter a new message for ")
ACE_TEXT ("the task pool...")));
n = ACE_OS::read (ACE_STDIN,
- mb->rd_ptr (),
+ mb->wr_ptr (),
mb->size ());
}
else
{
static size_t count = 0;
- ACE_OS::sprintf (mb->rd_ptr (),
+ ACE_OS::sprintf (mb->wr_ptr (),
"%d\n",
count);
n = ACE_OS::strlen (mb->rd_ptr ());
@@ -312,14 +312,14 @@ Thread_Pool::test_empty_message_shutdown (void)
ACE_TEXT ("(%t) enter a new message for ")
ACE_TEXT ("the task pool...")));
n = ACE_OS::read (ACE_STDIN,
- mb->rd_ptr (),
+ mb->wr_ptr (),
mb->size ());
}
else
{
static size_t count = 0;
- ACE_OS::sprintf (mb->rd_ptr (),
+ ACE_OS::sprintf (mb->wr_ptr (),
"%d\n",
count);
n = ACE_OS::strlen (mb->rd_ptr ());