Exemplo n.º 1
0
static void
test_unbind (ACE_Naming_Context &ns_context)
{
  int array [ACE_NS_MAX_ENTRIES];
  randomize (array, sizeof array / sizeof (int));

  // do the unbinds
  for (size_t i = 0; i < ACE_NS_MAX_ENTRIES; i++)
    {
      ACE_OS::sprintf (name, "%s%d", "name", array[i]);
      ACE_WString w_name (name);
      ACE_ASSERT (ns_context.unbind (w_name) != -1);
    }
}
Exemplo n.º 2
0
static void
test_unbind (ACE_Naming_Context &ns_context)
{
  int array [ACE_NS_MAX_ENTRIES];

  initialize_array (array, sizeof (array) / sizeof (array[0]));
  randomize (array, sizeof (array) / sizeof (array[0]));

  // do the unbinds
  for (size_t i = 0; i < ACE_NS_MAX_ENTRIES; i++)
    {
      ACE_OS::sprintf (name, "%s%d", "name", array[i]);
      ACE_NS_WString w_name (name);
      int unbind = ns_context.unbind (w_name);
      ACE_TEST_ASSERT (unbind != -1);
    }
}