diff options
author | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-10-28 00:09:12 +0000 |
---|---|---|
committer | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-10-28 00:09:12 +0000 |
commit | 078b7d32b8d91536d2a5188e92b9876266fce2f9 (patch) | |
tree | 0f08340da62e65c5d70f2280a712653d31ae96d9 /tests | |
parent | 7e71396565113e863b445d79c6d0fc7f0f79bd3a (diff) | |
download | ATCD-078b7d32b8d91536d2a5188e92b9876266fce2f9.tar.gz |
ChangeLogTag:Fri Oct 27 17:04:02 2000 Darrell Brunsch <brunsch@uci.edu>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/OS_Test.cpp | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/tests/OS_Test.cpp b/tests/OS_Test.cpp index b3b0c607875..d5a2d3ffca8 100644 --- a/tests/OS_Test.cpp +++ b/tests/OS_Test.cpp @@ -134,7 +134,7 @@ string_emulation_test (void) // Test memchr ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing memchr"))); - const char memchr1[] = "abcdefghijklmnopqrstuvwxyz"; + const char *memchr1 = "abcdefghijklmnopqrstuvwxyz"; ACE_ASSERT (ACE_OS_String::memchr (ACE_static_cast (const void *, NULL), 'a', @@ -146,7 +146,7 @@ string_emulation_test (void) // Test strchr ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing strchr"))); - const char strchr1[] = "abcdefghijkabcdefghijk"; + const char *strchr1 = "abcdefghijkabcdefghijk"; ACE_ASSERT (*ACE_OS_String::strchr (strchr1, 'h') == 'h'); ACE_ASSERT (ACE_OS_String::strchr (strchr1, 'h') == strchr1 + 7); @@ -156,7 +156,7 @@ string_emulation_test (void) // Test strrchr ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing strrchr"))); - const char strrchr1[] = "abcdefghijkabcdefghijk"; + const char *strrchr1 = "abcdefghijkabcdefghijk"; ACE_ASSERT (*ACE_OS_String::strrchr (strrchr1, 'h') == 'h'); ACE_ASSERT (ACE_OS_String::strrchr (strrchr1, 'h') == strrchr1 + 18); @@ -166,7 +166,7 @@ string_emulation_test (void) // Test strcspn ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing strcspn"))); - const char strcspn1[] = "abcdefghijkabcdefghijk"; + const char *strcspn1 = "abcdefghijkabcdefghijk"; ACE_ASSERT (ACE_OS_String::strcspn (strcspn1, "d") == 3); ACE_ASSERT (ACE_OS_String::strcspn (strcspn1, "abcdefghijk") == 0); @@ -175,11 +175,11 @@ string_emulation_test (void) // Test strcasecmp ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing strcasecmp"))); - const char strcasecmp1[] = "stringf"; - const char strcasecmp2[] = "stringfe"; // An extra character - const char strcasecmp3[] = "stringg"; // The last letter is higher - const char strcasecmp4[] = "STRINGF"; // Different case - const char strcasecmp5[] = "stringe"; // The last letter is lower + const char *strcasecmp1 = "stringf"; + const char *strcasecmp2 = "stringfe"; // An extra character + const char *strcasecmp3 = "stringg"; // The last letter is higher + const char *strcasecmp4 = "STRINGF"; // Different case + const char *strcasecmp5 = "stringe"; // The last letter is lower ACE_ASSERT (ACE_OS_String::strcasecmp (strcasecmp1, strcasecmp1) == 0); ACE_ASSERT (ACE_OS_String::strcasecmp (strcasecmp1, strcasecmp2) < 0); @@ -248,11 +248,11 @@ string_emulation_test (void) // Test strcmp (wchar_t version) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing strcmp (wchar_t version)"))); - const wchar_t strcmp1[] = ACE_TEXT_WIDE ("stringf"); - const wchar_t strcmp2[] = ACE_TEXT_WIDE ("stringfe"); - const wchar_t strcmp3[] = ACE_TEXT_WIDE ("stringg"); - const wchar_t strcmp4[] = ACE_TEXT_WIDE ("STRINGF"); - const wchar_t strcmp5[] = ACE_TEXT_WIDE ("stringe"); + const wchar_t *strcmp1 = ACE_TEXT_WIDE ("stringf"); + const wchar_t *strcmp2 = ACE_TEXT_WIDE ("stringfe"); + const wchar_t *strcmp3 = ACE_TEXT_WIDE ("stringg"); + const wchar_t *strcmp4 = ACE_TEXT_WIDE ("STRINGF"); + const wchar_t *strcmp5 = ACE_TEXT_WIDE ("stringe"); ACE_ASSERT (ACE_OS_String::strcmp (strcmp1, strcmp1) == 0); ACE_ASSERT (ACE_OS_String::strcmp (strcmp1, strcmp2) < 0); @@ -264,7 +264,7 @@ string_emulation_test (void) // Test strcpy (wchar_t version) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing strcpy (wchar_t version)"))); - const wchar_t strcpy1[] = ACE_TEXT_WIDE ("abcdefghijklmnopqrstuvwxyz"); + const wchar_t *strcpy1 = ACE_TEXT_WIDE ("abcdefghijklmnopqrstuvwxyz"); wchar_t strcpy2[27]; ACE_ASSERT @@ -276,9 +276,9 @@ string_emulation_test (void) // Test strcat (wchar_t version) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing strcat (wchar_t version)"))); - const wchar_t strcat1[] = ACE_TEXT_WIDE ("abcdefghijklmnopqrstuvwxyz"); + const wchar_t *strcat1 = ACE_TEXT_WIDE ("abcdefghijklmnopqrstuvwxyz"); wchar_t strcat2[27] = ACE_TEXT_WIDE ("abcdefghijkl"); - const wchar_t strcat3[] = ACE_TEXT_WIDE ("mnopqrstuvwxyz"); + const wchar_t *strcat3 = ACE_TEXT_WIDE ("mnopqrstuvwxyz"); ACE_ASSERT (ACE_OS_String::strcmp (ACE_OS_String::strcat (strcat2, strcat3), @@ -289,9 +289,9 @@ string_emulation_test (void) // Test strncat (wchar_t version) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing strncat (wchar_t version)"))); - const wchar_t strncat1[] = ACE_TEXT_WIDE ("abcdefghijklmnopqrstuvwxyz"); + const wchar_t *strncat1 = ACE_TEXT_WIDE ("abcdefghijklmnopqrstuvwxyz"); wchar_t strncat2[27] = ACE_TEXT_WIDE ("abcdefghijkl"); - const wchar_t strncat3[] = ACE_TEXT_WIDE ("mnopqrstuvwxyzabc"); + const wchar_t *strncat3 = ACE_TEXT_WIDE ("mnopqrstuvwxyzabc"); ACE_ASSERT (ACE_OS_String::strcmp (ACE_OS_String::strncat (strncat2, strncat3, 14), @@ -302,7 +302,7 @@ string_emulation_test (void) // Test strspn (wchar_t version) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing strspn (wchar_t version)"))); - const wchar_t strspn1[] = ACE_TEXT_WIDE ("abcdefghijkabcdefghijk"); + const wchar_t *strspn1 = ACE_TEXT_WIDE ("abcdefghijkabcdefghijk"); ACE_ASSERT (ACE_OS_String::strspn (strspn1, ACE_TEXT_WIDE ("abcdf")) == 4); @@ -313,7 +313,7 @@ string_emulation_test (void) // Test strchr (wchar_t version) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing strchr (wchar_t version)"))); - const wchar_t strchr1[] = ACE_TEXT_WIDE ("abcdefghijkabcdefghijk"); + const wchar_t *strchr1 = ACE_TEXT_WIDE ("abcdefghijkabcdefghijk"); ACE_ASSERT (*ACE_OS_String::strchr (strchr1, ACE_TEXT_WIDE ('h')) == ACE_TEXT_WIDE ('h')); @@ -325,7 +325,7 @@ string_emulation_test (void) // Test strstr (wchar_t version) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing strstr (wchar_t version)"))); - const wchar_t strstr1[] = ACE_TEXT_WIDE ("abcdefghijkabcdefghijk"); + const wchar_t *strstr1 = ACE_TEXT_WIDE ("abcdefghijkabcdefghijk"); ACE_ASSERT (ACE_OS_String::strncmp ( ACE_OS_String::strstr (strstr1, ACE_TEXT_WIDE ("def")), @@ -339,8 +339,8 @@ string_emulation_test (void) // Test strlen (wchar_t version) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing strlen (wchar_t version)"))); - const wchar_t strlen1[] = ACE_TEXT_WIDE (""); - const wchar_t strlen2[] = ACE_TEXT_WIDE ("12345"); + const wchar_t *strlen1 = ACE_TEXT_WIDE (""); + const wchar_t *strlen2 = ACE_TEXT_WIDE ("12345"); ACE_ASSERT (ACE_OS_String::strlen (strlen1) == 0); ACE_ASSERT (ACE_OS_String::strlen (strlen2) == 5); @@ -349,7 +349,7 @@ string_emulation_test (void) // Test strpbrk (wchar_t version) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing strpbrk (wchar_t version)"))); - const wchar_t strpbrk1[] = ACE_TEXT_WIDE ("abcdefghijkabcdefghijk"); + const wchar_t *strpbrk1 = ACE_TEXT_WIDE ("abcdefghijkabcdefghijk"); ACE_ASSERT (ACE_OS_String::strpbrk (strpbrk1, ACE_TEXT_WIDE ("ijkb")) == strpbrk1 + 1); @@ -362,7 +362,7 @@ string_emulation_test (void) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing strrchr"))); - const wchar_t strrchr1[] = ACE_TEXT_WIDE ("abcdefghijkabcdefghijk"); + const wchar_t *strrchr1 = ACE_TEXT_WIDE ("abcdefghijkabcdefghijk"); ACE_ASSERT (*ACE_OS_String::strrchr (strrchr1, ACE_TEXT_WIDE ('h')) == ACE_TEXT_WIDE ('h')); @@ -375,11 +375,11 @@ string_emulation_test (void) // Test strcasecmp (wchar_t version) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing strcasecmp (wchar_t version)"))); - const wchar_t strcasecmp1[] = ACE_TEXT_WIDE ("stringf"); - const wchar_t strcasecmp2[] = ACE_TEXT_WIDE ("stringfe"); - const wchar_t strcasecmp3[] = ACE_TEXT_WIDE ("stringg"); - const wchar_t strcasecmp4[] = ACE_TEXT_WIDE ("STRINGF"); - const wchar_t strcasecmp5[] = ACE_TEXT_WIDE ("stringe"); + const wchar_t *strcasecmp1 = ACE_TEXT_WIDE ("stringf"); + const wchar_t *strcasecmp2 = ACE_TEXT_WIDE ("stringfe"); + const wchar_t *strcasecmp3 = ACE_TEXT_WIDE ("stringg"); + const wchar_t *strcasecmp4 = ACE_TEXT_WIDE ("STRINGF"); + const wchar_t *strcasecmp5 = ACE_TEXT_WIDE ("stringe"); ACE_ASSERT (ACE_OS_String::strcasecmp (strcasecmp1, strcasecmp1) == 0); ACE_ASSERT (ACE_OS_String::strcasecmp (strcasecmp1, strcasecmp2) < 0); @@ -391,11 +391,11 @@ string_emulation_test (void) // Test strncasecmp (wchar_t version) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing strncasecmp (wchar_t version)"))); - const wchar_t strncasecmp1[] = ACE_TEXT_WIDE ("stringf"); - const wchar_t strncasecmp2[] = ACE_TEXT_WIDE ("stringfe"); - const wchar_t strncasecmp3[] = ACE_TEXT_WIDE ("stringg"); - const wchar_t strncasecmp4[] = ACE_TEXT_WIDE ("STRINGF"); - const wchar_t strncasecmp5[] = ACE_TEXT_WIDE ("stringe"); + const wchar_t *strncasecmp1 = ACE_TEXT_WIDE ("stringf"); + const wchar_t *strncasecmp2 = ACE_TEXT_WIDE ("stringfe"); + const wchar_t *strncasecmp3 = ACE_TEXT_WIDE ("stringg"); + const wchar_t *strncasecmp4 = ACE_TEXT_WIDE ("STRINGF"); + const wchar_t *strncasecmp5 = ACE_TEXT_WIDE ("stringe"); ACE_ASSERT (ACE_OS_String::strncasecmp (strncasecmp1, strncasecmp2, 7) == 0); @@ -412,11 +412,11 @@ string_emulation_test (void) // Test strncmp (wchar_t version) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing strncmp (wchar_t version)"))); - const wchar_t strncmp1[] = ACE_TEXT_WIDE ("stringf"); - const wchar_t strncmp2[] = ACE_TEXT_WIDE ("stringfe"); - const wchar_t strncmp3[] = ACE_TEXT_WIDE ("stringg"); - const wchar_t strncmp4[] = ACE_TEXT_WIDE ("STRINGF"); - const wchar_t strncmp5[] = ACE_TEXT_WIDE ("stringe"); + const wchar_t *strncmp1 = ACE_TEXT_WIDE ("stringf"); + const wchar_t *strncmp2 = ACE_TEXT_WIDE ("stringfe"); + const wchar_t *strncmp3 = ACE_TEXT_WIDE ("stringg"); + const wchar_t *strncmp4 = ACE_TEXT_WIDE ("STRINGF"); + const wchar_t *strncmp5 = ACE_TEXT_WIDE ("stringe"); ACE_ASSERT (ACE_OS_String::strncmp (strncmp1, strncmp2, 7) == 0); ACE_ASSERT (ACE_OS_String::strncmp (strncmp1, strncmp2, 8) < 0); @@ -428,7 +428,7 @@ string_emulation_test (void) // Test strncpy (wchar_t version) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing strncpy (wchar_t version)"))); - wchar_t strncpy1[] = ACE_TEXT_WIDE ("abcdefghijklmnopqrstuvwxyzabc"); + wchar_t *strncpy1 = ACE_TEXT_WIDE ("abcdefghijklmnopqrstuvwxyzabc"); wchar_t strncpy2[27]; ACE_ASSERT @@ -449,7 +449,7 @@ string_emulation_test (void) } int -main (int, ACE_TCHAR *[]) +main (int, char *[]) { ACE_START_TEST (ACE_TEXT ("OS_Test")); |