summaryrefslogtreecommitdiff
path: root/CIAO/connectors/dds4ccm/tests/Policies/partition_qos_test.cpp
blob: f0f5677418699c75810ce83907b9b01de0bbd8dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// $Id$

#include "partition_qos_test.h"

PartitionPolicyTest::PartitionPolicyTest ()
{
}

bool
PartitionPolicyTest::check (const ::DDS_PartitionQosPolicy & dds_qos,
                            const ::DDS::PartitionQosPolicy & qos)
{
  if (static_cast <CORBA::ULong> (dds_qos.name.length ()) !=
      qos.name.length ())
    {
      ACE_ERROR ((LM_ERROR, "ERROR PartitionPolicyTest : "
                            "Length name sequence is not equal "
                            "to original length.\n"));
      return false;
    }
  for (DDS_Long i = 0; i < dds_qos.name.length (); ++i)
    {
      if (ACE_OS::strcmp (dds_qos.name[i], qos.name[i]) != 0)
        {
          ACE_ERROR ((LM_ERROR, "ERROR PartitionPolicyTest : "
                            "Item %d of name sequence is not equal "
                            "to original.\n",
                            i));
          return false;
        }
    }
  return true;
}