summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog-99b3
-rw-r--r--ace/Map_Manager.cpp10
-rw-r--r--ace/Map_Manager.i4
-rw-r--r--tests/SString_Test.cpp21
4 files changed, 28 insertions, 10 deletions
diff --git a/ChangeLog-99b b/ChangeLog-99b
index 2c40fdf0808..7240fe7443e 100644
--- a/ChangeLog-99b
+++ b/ChangeLog-99b
@@ -18,6 +18,9 @@ Sun Jan 24 19:26:34 1999 Irfan Pyarali <irfan@cs.wustl.edu>
* ace/SString.cpp (set): Fixed usage case of when the incoming
string is not zero but the length specified is zero.
+ * tests/SString_Test.cpp (main): Added zero sized strings and
+ single character strings to the test.
+
Sun Jan 24 19:09:45 1999 Nanbor Wang <nanbor@cs.wustl.edu>
* ace/config-win32-common.h
diff --git a/ace/Map_Manager.cpp b/ace/Map_Manager.cpp
index 75a5e78199b..4ff94017a0b 100644
--- a/ace/Map_Manager.cpp
+++ b/ace/Map_Manager.cpp
@@ -29,7 +29,7 @@ ACE_ALLOC_HOOK_DEFINE(ACE_Map_Iterator)
ACE_ALLOC_HOOK_DEFINE(ACE_Map_Reverse_Iterator)
-template <class EXT_ID, class INT_ID, class ACE_LOCK> int
+ template <class EXT_ID, class INT_ID, class ACE_LOCK> int
ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::open (size_t size,
ACE_Allocator *alloc)
{
@@ -343,8 +343,8 @@ ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::find_i (const EXT_ID &ext_id,
}
template <class EXT_ID, class INT_ID, class ACE_LOCK> int
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::unbind_i (const EXT_ID &ext_id,
- size_t &index)
+ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::unbind_and_return_index (const EXT_ID &ext_id,
+ size_t &index)
{
// Try to find the key.
int result = this->find_and_return_index (ext_id,
@@ -368,8 +368,8 @@ ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::unbind_i (const EXT_ID &ext_id,
{
// Unbind the entry.
size_t index = 0;
- int result = this->unbind_i (ext_id,
- index);
+ int result = this->unbind_and_return_index (ext_id,
+ index);
if (result == 0)
{
diff --git a/ace/Map_Manager.i b/ace/Map_Manager.i
index 372fa847565..816eaccc890 100644
--- a/ace/Map_Manager.i
+++ b/ace/Map_Manager.i
@@ -129,8 +129,8 @@ ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::unbind_i (const EXT_ID &ext_id)
{
// Unbind the entry.
size_t index = 0;
- return this->unbind_i (ext_id,
- index);
+ return this->unbind_and_return_index (ext_id,
+ index);
}
template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int
diff --git a/tests/SString_Test.cpp b/tests/SString_Test.cpp
index e759e75d89c..e5811c6283c 100644
--- a/tests/SString_Test.cpp
+++ b/tests/SString_Test.cpp
@@ -34,13 +34,18 @@ main (int, ASYS_TCHAR *[])
ACE_START_TEST (ASYS_TEXT ("SString_Test"));
{
- ACE_CString empty_string;
ACE_CString s1 ("hello");
ACE_CString s2 ("world");
ACE_CString s3 ("ll");
ACE_CString s4 ("ello");
ACE_CString s5 = s1 + " " + s2;
+ char single_character = 'z';
+ ACE_CString single_character_string (single_character);
+
+ ACE_CString empty_string;
+ ACE_CString zero_size_string (s1.c_str (), 0, 0, 1);
+
ACE_ASSERT (s1 != s2);
ACE_ASSERT (s1 != s5);
ACE_ASSERT (s1.strstr (s2) == -1);
@@ -59,13 +64,18 @@ main (int, ASYS_TCHAR *[])
}
{
- ACE_CString empty_string (0, 0, 0);
ACE_CString s1 ("hello", 0, 0);
ACE_CString s2 ("world", 0, 0);
ACE_CString s3 ("ll", 0, 0);
ACE_CString s4 ("ello", 0, 0);
ACE_CString s5 = s1 + " " + s2;
+ char single_character = 'z';
+ ACE_CString single_character_string (single_character);
+
+ ACE_CString empty_string (0, 0, 0);
+ ACE_CString zero_size_string (s1.c_str (), 0, 0, 0);
+
ACE_ASSERT (s1 != s2);
ACE_ASSERT (s1 != s5);
ACE_ASSERT (s1.strstr (s2) == -1);
@@ -84,13 +94,18 @@ main (int, ASYS_TCHAR *[])
}
{
- ACE_WString empty_string;
ACE_WString s1 ("hello");
ACE_WString s2 ("world");
ACE_WString s3 ("ll");
ACE_WString s4 ("ello");
ACE_WString s5 = s1 + " " + s2;
+ ACE_USHORT16 single_character = 'z';
+ ACE_WString single_character_string (single_character);
+
+ ACE_WString empty_string;
+ ACE_WString zero_size_string (s1.c_str (), 0, 0);
+
ACE_ASSERT (s1 != s2);
ACE_ASSERT (s1 != s5);
ACE_ASSERT (s1.strstr (s2) == -1);